#include <metal_stdlib>
using namespace metal;

#define TINT_ISOLATE_UB(VOLATILE_NAME) \
  volatile bool VOLATILE_NAME = true; \
  if (VOLATILE_NAME)

int f() {
  int i = 0;
  int j = 0;
  {
    TINT_ISOLATE_UB(tint_volatile_true) while(true) {
      i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
      if ((i > 4)) {
        return 1;
      }
      {
        TINT_ISOLATE_UB(tint_volatile_true_1) while(true) {
          j = as_type<int>((as_type<uint>(j) + as_type<uint>(1)));
          if ((j > 4)) {
            return 2;
          }
          {
          }
          continue;
        }
      }
      /* unreachable */
    }
  }
  /* unreachable */
}
