code: def igammac_impl(a, x, *, dtype):
      out_of_range = bitwise_or(
          le(x, _const(x, 0)), le(a, _const(a, 0))
      )
      use_igamma = bitwise_or(lt(x, _const(x, 1)), lt(x, a))
      ax = a * log(x) - x - lgamma(a)
      underflow = lt(ax, -log(dtypes.finfo(dtype).max))
      enabled = bitwise_not(bitwise_or(out_of_range, underflow))
      ax = exp(ax)
  
      igamma_call = _igamma_series(
          ax,
          x,
          a,
          bitwise_and(enabled, use_igamma),
          dtype,
          IgammaMode.VALUE,
      )
      igammac_cf_call = _igammac_continued_fraction(
          ax,
          x,
          a,
          bitwise_and(enabled, bitwise_not(use_igamma)),
          dtype,
          IgammaMode.VALUE,
      )
  
      result = select(
          use_igamma, _const(a, 1) - igamma_call, igammac_cf_call
      )
      x_is_infinity = eq(x, _const(x, float("inf")))
      result = select(x_is_infinity, full_like(result, 0), result)
      return select(out_of_range, full_like(a, 1), result)
  
imports: from enum import Enum
  import numpy
  from functools import partial
  from jax._src.lax.lax import add, bitwise_and, bitwise_not, bitwise_or, broadcast_in_dim, broadcast_shapes, convert_element_type, div, eq, exp, full_like, ge, gt, le, log, log1p, lt, mul, ne, neg, reciprocal, reduce, select, sign, sqrt, square, standard_naryop, standard_unop, sub, _const, _dtype, _float, _nary_lower_hlo, _ones, _isnan, _reduce
  from jax._src.lax.control_flow import while_loop
  from jax._src import dtypes
  from jax._src.interpreters import ad
  from jax._src.interpreters import mlir
  from jax._src.lib.mlir.dialects import chlo
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 29 for calling a global function with example usage: igammac_impl(a, x) and returns: select