{
  "esm": "1.1.0",
  "metadata": {
    "name": "Interp",
    "description": "Standard-library interpolation templates (esm-spec §9.7.1 template-library file). Three match-less expression templates give the pure-AST definitions of 1-D search, 1-D linear and 2-D bilinear interpolation, written with `faq` comparison counts, the `index` op and arithmetic in the evaluation order esm-spec §9.2 pins: `searchsorted(x, xs, n)`, `linear(table, axis, x, n)` and `bilinear(table, axis_x, axis_y, x, y, nx, ny)`. Each axis length is an explicit integer parameter. On the scenarios of tests/closed_functions/interp/ each template gives the same bits as the matching `interp.*` closed function. Import with `expression_template_imports` and invoke with `apply_expression_template`; see docs/content/standard_library.md.",
    "authors": [
      "EarthSciML"
    ],
    "created": "2026-04-25T00:00:00Z",
    "tags": [
      "standard-library",
      "interpolation",
      "searchsorted",
      "expression-templates"
    ],
    "references": [
      {
        "citation": "esm-spec.md §9.2 (interp.searchsorted, interp.linear, interp.bilinear semantics); §9.6 (expression templates); §9.7.1 (template-library files); §4.3.3 (index op)."
      }
    ]
  },
  "expression_templates": {
    "searchsorted": {
      "params": [
        "x",
        "xs",
        "n"
      ],
      "description": "1-based index of the first entry of the non-decreasing axis `xs` (n entries) that is >= x: 1 plus the number of entries for which `xs[k] >= x` is false. Equal entries give the smallest such index, x above every entry (or NaN) gives n + 1, and n = 0 gives 1, as esm-spec §9.2 specifies for interp.searchsorted.",
      "body": {
        "op": "+",
        "args": [
          1,
          {
            "op": "faq",
            "args": [
              "xs"
            ],
            "output_idx": [],
            "reduce": "+",
            "ranges": {
              "k_ss": [
                1,
                "n"
              ]
            },
            "expr": {
              "op": "ifelse",
              "args": [
                {
                  "op": ">=",
                  "args": [
                    {
                      "op": "index",
                      "args": [
                        "xs",
                        "k_ss"
                      ]
                    },
                    "x"
                  ]
                },
                0,
                1
              ]
            }
          }
        ]
      }
    },
    "linear": {
      "params": [
        "table",
        "axis",
        "x",
        "n"
      ],
      "description": "1-D linear interpolation of `table` over the strictly increasing `axis` (both n >= 2 entries) at x, flat outside the axis. The cell index is the number of axis entries <= x held to [1, n - 1]; the blend is table[i] + w * (table[i+1] - table[i]) with w = (x - axis[i]) / (axis[i+1] - axis[i]), the order esm-spec §9.2 pins for interp.linear. NaN x gives NaN.",
      "body": {
        "op": "ifelse",
        "args": [
          {
            "op": "<=",
            "args": [
              "x",
              {
                "op": "index",
                "args": [
                  "axis",
                  1
                ]
              }
            ]
          },
          {
            "op": "index",
            "args": [
              "table",
              1
            ]
          },
          {
            "op": "ifelse",
            "args": [
              {
                "op": ">=",
                "args": [
                  "x",
                  {
                    "op": "index",
                    "args": [
                      "axis",
                      "n"
                    ]
                  }
                ]
              },
              {
                "op": "index",
                "args": [
                  "table",
                  "n"
                ]
              },
              {
                "op": "+",
                "args": [
                  {
                    "op": "index",
                    "args": [
                      "table",
                      {
                        "op": "min",
                        "args": [
                          {
                            "op": "max",
                            "args": [
                              {
                                "op": "faq",
                                "args": [
                                  "axis"
                                ],
                                "output_idx": [],
                                "reduce": "+",
                                "ranges": {
                                  "k_lin": [
                                    1,
                                    "n"
                                  ]
                                },
                                "expr": {
                                  "op": "ifelse",
                                  "args": [
                                    {
                                      "op": "<=",
                                      "args": [
                                        {
                                          "op": "index",
                                          "args": [
                                            "axis",
                                            "k_lin"
                                          ]
                                        },
                                        "x"
                                      ]
                                    },
                                    1,
                                    0
                                  ]
                                }
                              },
                              1
                            ]
                          },
                          {
                            "op": "-",
                            "args": [
                              "n",
                              1
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "op": "*",
                    "args": [
                      {
                        "op": "/",
                        "args": [
                          {
                            "op": "-",
                            "args": [
                              "x",
                              {
                                "op": "index",
                                "args": [
                                  "axis",
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_lin": [
                                                1,
                                                "n"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis",
                                                        "k_lin"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "n",
                                          1
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "op": "-",
                            "args": [
                              {
                                "op": "index",
                                "args": [
                                  "axis",
                                  {
                                    "op": "+",
                                    "args": [
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_lin": [
                                                    1,
                                                    "n"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis",
                                                            "k_lin"
                                                          ]
                                                        },
                                                        "x"
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "n",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      1
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "index",
                                "args": [
                                  "axis",
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_lin": [
                                                1,
                                                "n"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis",
                                                        "k_lin"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "n",
                                          1
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "op": "-",
                        "args": [
                          {
                            "op": "index",
                            "args": [
                              "table",
                              {
                                "op": "+",
                                "args": [
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_lin": [
                                                1,
                                                "n"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis",
                                                        "k_lin"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "n",
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "index",
                            "args": [
                              "table",
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_lin": [
                                            1,
                                            "n"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis",
                                                    "k_lin"
                                                  ]
                                                },
                                                "x"
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "n",
                                      1
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    "bilinear": {
      "params": [
        "table",
        "axis_x",
        "axis_y",
        "x",
        "y",
        "nx",
        "ny"
      ],
      "description": "2-D bilinear interpolation of the row-major `table` (nx rows of ny entries) over the strictly increasing axes `axis_x` (nx >= 2) and `axis_y` (ny >= 2). Each query is clamped to its axis, the cell index on each axis is the number of entries <= the clamped query held to [1, n - 1] (so a query on an interior knot k selects cell k), and the two x-blends then the y-blend follow the order esm-spec §9.2 pins for interp.bilinear.",
      "body": {
        "op": "+",
        "args": [
          {
            "op": "+",
            "args": [
              {
                "op": "index",
                "args": [
                  "table",
                  {
                    "op": "min",
                    "args": [
                      {
                        "op": "max",
                        "args": [
                          {
                            "op": "faq",
                            "args": [
                              "axis_x"
                            ],
                            "output_idx": [],
                            "reduce": "+",
                            "ranges": {
                              "k_bx": [
                                1,
                                "nx"
                              ]
                            },
                            "expr": {
                              "op": "ifelse",
                              "args": [
                                {
                                  "op": "<=",
                                  "args": [
                                    {
                                      "op": "index",
                                      "args": [
                                        "axis_x",
                                        "k_bx"
                                      ]
                                    },
                                    {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            "x",
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_x",
                                                1
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "op": "index",
                                          "args": [
                                            "axis_x",
                                            1
                                          ]
                                        },
                                        {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": ">=",
                                              "args": [
                                                "x",
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    "nx"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_x",
                                                "nx"
                                              ]
                                            },
                                            "x"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                1,
                                0
                              ]
                            }
                          },
                          1
                        ]
                      },
                      {
                        "op": "-",
                        "args": [
                          "nx",
                          1
                        ]
                      }
                    ]
                  },
                  {
                    "op": "min",
                    "args": [
                      {
                        "op": "max",
                        "args": [
                          {
                            "op": "faq",
                            "args": [
                              "axis_y"
                            ],
                            "output_idx": [],
                            "reduce": "+",
                            "ranges": {
                              "k_by": [
                                1,
                                "ny"
                              ]
                            },
                            "expr": {
                              "op": "ifelse",
                              "args": [
                                {
                                  "op": "<=",
                                  "args": [
                                    {
                                      "op": "index",
                                      "args": [
                                        "axis_y",
                                        "k_by"
                                      ]
                                    },
                                    {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            "y",
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                1
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "op": "index",
                                          "args": [
                                            "axis_y",
                                            1
                                          ]
                                        },
                                        {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": ">=",
                                              "args": [
                                                "y",
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    "ny"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "ny"
                                              ]
                                            },
                                            "y"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                1,
                                0
                              ]
                            }
                          },
                          1
                        ]
                      },
                      {
                        "op": "-",
                        "args": [
                          "ny",
                          1
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "op": "*",
                "args": [
                  {
                    "op": "/",
                    "args": [
                      {
                        "op": "-",
                        "args": [
                          {
                            "op": "ifelse",
                            "args": [
                              {
                                "op": "<=",
                                "args": [
                                  "x",
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      1
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "index",
                                "args": [
                                  "axis_x",
                                  1
                                ]
                              },
                              {
                                "op": "ifelse",
                                "args": [
                                  {
                                    "op": ">=",
                                    "args": [
                                      "x",
                                      {
                                        "op": "index",
                                        "args": [
                                          "axis_x",
                                          "nx"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      "nx"
                                    ]
                                  },
                                  "x"
                                ]
                              }
                            ]
                          },
                          {
                            "op": "index",
                            "args": [
                              "axis_x",
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis_x"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_bx": [
                                            1,
                                            "nx"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    "k_bx"
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": ">=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        },
                                                        "x"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "nx",
                                      1
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "op": "-",
                        "args": [
                          {
                            "op": "index",
                            "args": [
                              "axis_x",
                              {
                                "op": "+",
                                "args": [
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis_x"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_bx": [
                                                1,
                                                "nx"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "k_bx"
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": ">=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            },
                                                            "x"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "nx",
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "index",
                            "args": [
                              "axis_x",
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis_x"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_bx": [
                                            1,
                                            "nx"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    "k_bx"
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": ">=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        },
                                                        "x"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "nx",
                                      1
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "op": "-",
                    "args": [
                      {
                        "op": "index",
                        "args": [
                          "table",
                          {
                            "op": "+",
                            "args": [
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis_x"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_bx": [
                                            1,
                                            "nx"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    "k_bx"
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": ">=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        },
                                                        "x"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "nx",
                                      1
                                    ]
                                  }
                                ]
                              },
                              1
                            ]
                          },
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_y"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_by": [
                                        1,
                                        "ny"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "k_by"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "y",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "ny"
                                                      ]
                                                    },
                                                    "y"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "ny",
                                  1
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "op": "index",
                        "args": [
                          "table",
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_x"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_bx": [
                                        1,
                                        "nx"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_x",
                                                "k_bx"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "x",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "nx"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "nx",
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_y"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_by": [
                                        1,
                                        "ny"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "k_by"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "y",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "ny"
                                                      ]
                                                    },
                                                    "y"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "ny",
                                  1
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "op": "*",
            "args": [
              {
                "op": "/",
                "args": [
                  {
                    "op": "-",
                    "args": [
                      {
                        "op": "ifelse",
                        "args": [
                          {
                            "op": "<=",
                            "args": [
                              "y",
                              {
                                "op": "index",
                                "args": [
                                  "axis_y",
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "index",
                            "args": [
                              "axis_y",
                              1
                            ]
                          },
                          {
                            "op": "ifelse",
                            "args": [
                              {
                                "op": ">=",
                                "args": [
                                  "y",
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_y",
                                      "ny"
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "index",
                                "args": [
                                  "axis_y",
                                  "ny"
                                ]
                              },
                              "y"
                            ]
                          }
                        ]
                      },
                      {
                        "op": "index",
                        "args": [
                          "axis_y",
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_y"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_by": [
                                        1,
                                        "ny"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "k_by"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "y",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "ny"
                                                      ]
                                                    },
                                                    "y"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "ny",
                                  1
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "op": "-",
                    "args": [
                      {
                        "op": "index",
                        "args": [
                          "axis_y",
                          {
                            "op": "+",
                            "args": [
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis_y"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_by": [
                                            1,
                                            "ny"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    "k_by"
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            1
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": ">=",
                                                          "args": [
                                                            "y",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                "ny"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        },
                                                        "y"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "ny",
                                      1
                                    ]
                                  }
                                ]
                              },
                              1
                            ]
                          }
                        ]
                      },
                      {
                        "op": "index",
                        "args": [
                          "axis_y",
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_y"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_by": [
                                        1,
                                        "ny"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "k_by"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "y",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "ny"
                                                      ]
                                                    },
                                                    "y"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "ny",
                                  1
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "op": "-",
                "args": [
                  {
                    "op": "+",
                    "args": [
                      {
                        "op": "index",
                        "args": [
                          "table",
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_x"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_bx": [
                                        1,
                                        "nx"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_x",
                                                "k_bx"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "x",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "nx"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "nx",
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "+",
                            "args": [
                              {
                                "op": "min",
                                "args": [
                                  {
                                    "op": "max",
                                    "args": [
                                      {
                                        "op": "faq",
                                        "args": [
                                          "axis_y"
                                        ],
                                        "output_idx": [],
                                        "reduce": "+",
                                        "ranges": {
                                          "k_by": [
                                            1,
                                            "ny"
                                          ]
                                        },
                                        "expr": {
                                          "op": "ifelse",
                                          "args": [
                                            {
                                              "op": "<=",
                                              "args": [
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    "k_by"
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            1
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": ">=",
                                                          "args": [
                                                            "y",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                "ny"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        },
                                                        "y"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            1,
                                            0
                                          ]
                                        }
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "-",
                                    "args": [
                                      "ny",
                                      1
                                    ]
                                  }
                                ]
                              },
                              1
                            ]
                          }
                        ]
                      },
                      {
                        "op": "*",
                        "args": [
                          {
                            "op": "/",
                            "args": [
                              {
                                "op": "-",
                                "args": [
                                  {
                                    "op": "ifelse",
                                    "args": [
                                      {
                                        "op": "<=",
                                        "args": [
                                          "x",
                                          {
                                            "op": "index",
                                            "args": [
                                              "axis_x",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "op": "index",
                                        "args": [
                                          "axis_x",
                                          1
                                        ]
                                      },
                                      {
                                        "op": "ifelse",
                                        "args": [
                                          {
                                            "op": ">=",
                                            "args": [
                                              "x",
                                              {
                                                "op": "index",
                                                "args": [
                                                  "axis_x",
                                                  "nx"
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "op": "index",
                                            "args": [
                                              "axis_x",
                                              "nx"
                                            ]
                                          },
                                          "x"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "+",
                                        "args": [
                                          {
                                            "op": "min",
                                            "args": [
                                              {
                                                "op": "max",
                                                "args": [
                                                  {
                                                    "op": "faq",
                                                    "args": [
                                                      "axis_x"
                                                    ],
                                                    "output_idx": [],
                                                    "reduce": "+",
                                                    "ranges": {
                                                      "k_bx": [
                                                        1,
                                                        "nx"
                                                      ]
                                                    },
                                                    "expr": {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "k_bx"
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": "<=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        1
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "ifelse",
                                                                  "args": [
                                                                    {
                                                                      "op": ">=",
                                                                      "args": [
                                                                        "x",
                                                                        {
                                                                          "op": "index",
                                                                          "args": [
                                                                            "axis_x",
                                                                            "nx"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    },
                                                                    "x"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        1,
                                                        0
                                                      ]
                                                    }
                                                  },
                                                  1
                                                ]
                                              },
                                              {
                                                "op": "-",
                                                "args": [
                                                  "nx",
                                                  1
                                                ]
                                              }
                                            ]
                                          },
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "op": "-",
                            "args": [
                              {
                                "op": "index",
                                "args": [
                                  "table",
                                  {
                                    "op": "+",
                                    "args": [
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "+",
                                    "args": [
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_y"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_by": [
                                                    1,
                                                    "ny"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "k_by"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "y",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "y",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_y",
                                                                        "ny"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    "ny"
                                                                  ]
                                                                },
                                                                "y"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "ny",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      1
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "index",
                                "args": [
                                  "table",
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis_x"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_bx": [
                                                1,
                                                "nx"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "k_bx"
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": ">=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            },
                                                            "x"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "nx",
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "+",
                                    "args": [
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_y"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_by": [
                                                    1,
                                                    "ny"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "k_by"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "y",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "y",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_y",
                                                                        "ny"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    "ny"
                                                                  ]
                                                                },
                                                                "y"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "ny",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      1
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "op": "+",
                    "args": [
                      {
                        "op": "index",
                        "args": [
                          "table",
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_x"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_bx": [
                                        1,
                                        "nx"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_x",
                                                "k_bx"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "x",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_x",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "x",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "nx"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "nx"
                                                      ]
                                                    },
                                                    "x"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "nx",
                                  1
                                ]
                              }
                            ]
                          },
                          {
                            "op": "min",
                            "args": [
                              {
                                "op": "max",
                                "args": [
                                  {
                                    "op": "faq",
                                    "args": [
                                      "axis_y"
                                    ],
                                    "output_idx": [],
                                    "reduce": "+",
                                    "ranges": {
                                      "k_by": [
                                        1,
                                        "ny"
                                      ]
                                    },
                                    "expr": {
                                      "op": "ifelse",
                                      "args": [
                                        {
                                          "op": "<=",
                                          "args": [
                                            {
                                              "op": "index",
                                              "args": [
                                                "axis_y",
                                                "k_by"
                                              ]
                                            },
                                            {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    "y",
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        1
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "op": "index",
                                                  "args": [
                                                    "axis_y",
                                                    1
                                                  ]
                                                },
                                                {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": ">=",
                                                      "args": [
                                                        "y",
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            "ny"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "ny"
                                                      ]
                                                    },
                                                    "y"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        1,
                                        0
                                      ]
                                    }
                                  },
                                  1
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  "ny",
                                  1
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "op": "*",
                        "args": [
                          {
                            "op": "/",
                            "args": [
                              {
                                "op": "-",
                                "args": [
                                  {
                                    "op": "ifelse",
                                    "args": [
                                      {
                                        "op": "<=",
                                        "args": [
                                          "x",
                                          {
                                            "op": "index",
                                            "args": [
                                              "axis_x",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "op": "index",
                                        "args": [
                                          "axis_x",
                                          1
                                        ]
                                      },
                                      {
                                        "op": "ifelse",
                                        "args": [
                                          {
                                            "op": ">=",
                                            "args": [
                                              "x",
                                              {
                                                "op": "index",
                                                "args": [
                                                  "axis_x",
                                                  "nx"
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "op": "index",
                                            "args": [
                                              "axis_x",
                                              "nx"
                                            ]
                                          },
                                          "x"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "-",
                                "args": [
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "+",
                                        "args": [
                                          {
                                            "op": "min",
                                            "args": [
                                              {
                                                "op": "max",
                                                "args": [
                                                  {
                                                    "op": "faq",
                                                    "args": [
                                                      "axis_x"
                                                    ],
                                                    "output_idx": [],
                                                    "reduce": "+",
                                                    "ranges": {
                                                      "k_bx": [
                                                        1,
                                                        "nx"
                                                      ]
                                                    },
                                                    "expr": {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "k_bx"
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": "<=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        1
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "ifelse",
                                                                  "args": [
                                                                    {
                                                                      "op": ">=",
                                                                      "args": [
                                                                        "x",
                                                                        {
                                                                          "op": "index",
                                                                          "args": [
                                                                            "axis_x",
                                                                            "nx"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    },
                                                                    "x"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        1,
                                                        0
                                                      ]
                                                    }
                                                  },
                                                  1
                                                ]
                                              },
                                              {
                                                "op": "-",
                                                "args": [
                                                  "nx",
                                                  1
                                                ]
                                              }
                                            ]
                                          },
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "index",
                                    "args": [
                                      "axis_x",
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "op": "-",
                            "args": [
                              {
                                "op": "index",
                                "args": [
                                  "table",
                                  {
                                    "op": "+",
                                    "args": [
                                      {
                                        "op": "min",
                                        "args": [
                                          {
                                            "op": "max",
                                            "args": [
                                              {
                                                "op": "faq",
                                                "args": [
                                                  "axis_x"
                                                ],
                                                "output_idx": [],
                                                "reduce": "+",
                                                "ranges": {
                                                  "k_bx": [
                                                    1,
                                                    "nx"
                                                  ]
                                                },
                                                "expr": {
                                                  "op": "ifelse",
                                                  "args": [
                                                    {
                                                      "op": "<=",
                                                      "args": [
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            "k_bx"
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": "<=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    1
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            },
                                                            {
                                                              "op": "ifelse",
                                                              "args": [
                                                                {
                                                                  "op": ">=",
                                                                  "args": [
                                                                    "x",
                                                                    {
                                                                      "op": "index",
                                                                      "args": [
                                                                        "axis_x",
                                                                        "nx"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                },
                                                                "x"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    1,
                                                    0
                                                  ]
                                                }
                                              },
                                              1
                                            ]
                                          },
                                          {
                                            "op": "-",
                                            "args": [
                                              "nx",
                                              1
                                            ]
                                          }
                                        ]
                                      },
                                      1
                                    ]
                                  },
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis_y"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_by": [
                                                1,
                                                "ny"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "k_by"
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            "y",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                1
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            1
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": ">=",
                                                              "args": [
                                                                "y",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    "ny"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                "ny"
                                                              ]
                                                            },
                                                            "y"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "ny",
                                          1
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "op": "index",
                                "args": [
                                  "table",
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis_x"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_bx": [
                                                1,
                                                "nx"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_x",
                                                        "k_bx"
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            "x",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                1
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_x",
                                                            1
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": ">=",
                                                              "args": [
                                                                "x",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_x",
                                                                    "nx"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_x",
                                                                "nx"
                                                              ]
                                                            },
                                                            "x"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "nx",
                                          1
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "op": "min",
                                    "args": [
                                      {
                                        "op": "max",
                                        "args": [
                                          {
                                            "op": "faq",
                                            "args": [
                                              "axis_y"
                                            ],
                                            "output_idx": [],
                                            "reduce": "+",
                                            "ranges": {
                                              "k_by": [
                                                1,
                                                "ny"
                                              ]
                                            },
                                            "expr": {
                                              "op": "ifelse",
                                              "args": [
                                                {
                                                  "op": "<=",
                                                  "args": [
                                                    {
                                                      "op": "index",
                                                      "args": [
                                                        "axis_y",
                                                        "k_by"
                                                      ]
                                                    },
                                                    {
                                                      "op": "ifelse",
                                                      "args": [
                                                        {
                                                          "op": "<=",
                                                          "args": [
                                                            "y",
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                1
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "op": "index",
                                                          "args": [
                                                            "axis_y",
                                                            1
                                                          ]
                                                        },
                                                        {
                                                          "op": "ifelse",
                                                          "args": [
                                                            {
                                                              "op": ">=",
                                                              "args": [
                                                                "y",
                                                                {
                                                                  "op": "index",
                                                                  "args": [
                                                                    "axis_y",
                                                                    "ny"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "op": "index",
                                                              "args": [
                                                                "axis_y",
                                                                "ny"
                                                              ]
                                                            },
                                                            "y"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                1,
                                                0
                                              ]
                                            }
                                          },
                                          1
                                        ]
                                      },
                                      {
                                        "op": "-",
                                        "args": [
                                          "ny",
                                          1
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  }
}
