/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

public class Main {

  Object i0000, i0001, i0002, i0003, i0004, i0005, i0006, i0007, i0008, i0009;
  Object i0010, i0011, i0012, i0013, i0014, i0015, i0016, i0017, i0018, i0019;
  Object i0020, i0021, i0022, i0023, i0024, i0025, i0026, i0027, i0028, i0029;
  Object i0030, i0031, i0032, i0033, i0034, i0035, i0036, i0037, i0038, i0039;
  Object i0040, i0041, i0042, i0043, i0044, i0045, i0046, i0047, i0048, i0049;
  Object i0050, i0051, i0052, i0053, i0054, i0055, i0056, i0057, i0058, i0059;
  Object i0060, i0061, i0062, i0063, i0064, i0065, i0066, i0067, i0068, i0069;
  Object i0070, i0071, i0072, i0073, i0074, i0075, i0076, i0077, i0078, i0079;
  Object i0080, i0081, i0082, i0083, i0084, i0085, i0086, i0087, i0088, i0089;
  Object i0090, i0091, i0092, i0093, i0094, i0095, i0096, i0097, i0098, i0099;

  Object i0100, i0101, i0102, i0103, i0104, i0105, i0106, i0107, i0108, i0109;
  Object i0110, i0111, i0112, i0113, i0114, i0115, i0116, i0117, i0118, i0119;
  Object i0120, i0121, i0122, i0123, i0124, i0125, i0126, i0127, i0128, i0129;
  Object i0130, i0131, i0132, i0133, i0134, i0135, i0136, i0137, i0138, i0139;
  Object i0140, i0141, i0142, i0143, i0144, i0145, i0146, i0147, i0148, i0149;
  Object i0150, i0151, i0152, i0153, i0154, i0155, i0156, i0157, i0158, i0159;
  Object i0160, i0161, i0162, i0163, i0164, i0165, i0166, i0167, i0168, i0169;
  Object i0170, i0171, i0172, i0173, i0174, i0175, i0176, i0177, i0178, i0179;
  Object i0180, i0181, i0182, i0183, i0184, i0185, i0186, i0187, i0188, i0189;
  Object i0190, i0191, i0192, i0193, i0194, i0195, i0196, i0197, i0198, i0199;

  Object i0200, i0201, i0202, i0203, i0204, i0205, i0206, i0207, i0208, i0209;
  Object i0210, i0211, i0212, i0213, i0214, i0215, i0216, i0217, i0218, i0219;
  Object i0220, i0221, i0222, i0223, i0224, i0225, i0226, i0227, i0228, i0229;
  Object i0230, i0231, i0232, i0233, i0234, i0235, i0236, i0237, i0238, i0239;
  Object i0240, i0241, i0242, i0243, i0244, i0245, i0246, i0247, i0248, i0249;
  Object i0250, i0251, i0252, i0253, i0254, i0255, i0256, i0257, i0258, i0259;
  Object i0260, i0261, i0262, i0263, i0264, i0265, i0266, i0267, i0268, i0269;
  Object i0270, i0271, i0272, i0273, i0274, i0275, i0276, i0277, i0278, i0279;
  Object i0280, i0281, i0282, i0283, i0284, i0285, i0286, i0287, i0288, i0289;
  Object i0290, i0291, i0292, i0293, i0294, i0295, i0296, i0297, i0298, i0299;

  Object i0300, i0301, i0302, i0303, i0304, i0305, i0306, i0307, i0308, i0309;
  Object i0310, i0311, i0312, i0313, i0314, i0315, i0316, i0317, i0318, i0319;
  Object i0320, i0321, i0322, i0323, i0324, i0325, i0326, i0327, i0328, i0329;
  Object i0330, i0331, i0332, i0333, i0334, i0335, i0336, i0337, i0338, i0339;
  Object i0340, i0341, i0342, i0343, i0344, i0345, i0346, i0347, i0348, i0349;
  Object i0350, i0351, i0352, i0353, i0354, i0355, i0356, i0357, i0358, i0359;
  Object i0360, i0361, i0362, i0363, i0364, i0365, i0366, i0367, i0368, i0369;
  Object i0370, i0371, i0372, i0373, i0374, i0375, i0376, i0377, i0378, i0379;
  Object i0380, i0381, i0382, i0383, i0384, i0385, i0386, i0387, i0388, i0389;
  Object i0390, i0391, i0392, i0393, i0394, i0395, i0396, i0397, i0398, i0399;

  Object i0400, i0401, i0402, i0403, i0404, i0405, i0406, i0407, i0408, i0409;
  Object i0410, i0411, i0412, i0413, i0414, i0415, i0416, i0417, i0418, i0419;
  Object i0420, i0421, i0422, i0423, i0424, i0425, i0426, i0427, i0428, i0429;
  Object i0430, i0431, i0432, i0433, i0434, i0435, i0436, i0437, i0438, i0439;
  Object i0440, i0441, i0442, i0443, i0444, i0445, i0446, i0447, i0448, i0449;
  Object i0450, i0451, i0452, i0453, i0454, i0455, i0456, i0457, i0458, i0459;
  Object i0460, i0461, i0462, i0463, i0464, i0465, i0466, i0467, i0468, i0469;
  Object i0470, i0471, i0472, i0473, i0474, i0475, i0476, i0477, i0478, i0479;
  Object i0480, i0481, i0482, i0483, i0484, i0485, i0486, i0487, i0488, i0489;
  Object i0490, i0491, i0492, i0493, i0494, i0495, i0496, i0497, i0498, i0499;

  Object i0500, i0501, i0502, i0503, i0504, i0505, i0506, i0507, i0508, i0509;
  Object i0510, i0511, i0512, i0513, i0514, i0515, i0516, i0517, i0518, i0519;
  Object i0520, i0521, i0522, i0523, i0524, i0525, i0526, i0527, i0528, i0529;
  Object i0530, i0531, i0532, i0533, i0534, i0535, i0536, i0537, i0538, i0539;
  Object i0540, i0541, i0542, i0543, i0544, i0545, i0546, i0547, i0548, i0549;
  Object i0550, i0551, i0552, i0553, i0554, i0555, i0556, i0557, i0558, i0559;
  Object i0560, i0561, i0562, i0563, i0564, i0565, i0566, i0567, i0568, i0569;
  Object i0570, i0571, i0572, i0573, i0574, i0575, i0576, i0577, i0578, i0579;
  Object i0580, i0581, i0582, i0583, i0584, i0585, i0586, i0587, i0588, i0589;
  Object i0590, i0591, i0592, i0593, i0594, i0595, i0596, i0597, i0598, i0599;

  Object i0600, i0601, i0602, i0603, i0604, i0605, i0606, i0607, i0608, i0609;
  Object i0610, i0611, i0612, i0613, i0614, i0615, i0616, i0617, i0618, i0619;
  Object i0620, i0621, i0622, i0623, i0624, i0625, i0626, i0627, i0628, i0629;
  Object i0630, i0631, i0632, i0633, i0634, i0635, i0636, i0637, i0638, i0639;
  Object i0640, i0641, i0642, i0643, i0644, i0645, i0646, i0647, i0648, i0649;
  Object i0650, i0651, i0652, i0653, i0654, i0655, i0656, i0657, i0658, i0659;
  Object i0660, i0661, i0662, i0663, i0664, i0665, i0666, i0667, i0668, i0669;
  Object i0670, i0671, i0672, i0673, i0674, i0675, i0676, i0677, i0678, i0679;
  Object i0680, i0681, i0682, i0683, i0684, i0685, i0686, i0687, i0688, i0689;
  Object i0690, i0691, i0692, i0693, i0694, i0695, i0696, i0697, i0698, i0699;

  Object i0700, i0701, i0702, i0703, i0704, i0705, i0706, i0707, i0708, i0709;
  Object i0710, i0711, i0712, i0713, i0714, i0715, i0716, i0717, i0718, i0719;
  Object i0720, i0721, i0722, i0723, i0724, i0725, i0726, i0727, i0728, i0729;
  Object i0730, i0731, i0732, i0733, i0734, i0735, i0736, i0737, i0738, i0739;
  Object i0740, i0741, i0742, i0743, i0744, i0745, i0746, i0747, i0748, i0749;
  Object i0750, i0751, i0752, i0753, i0754, i0755, i0756, i0757, i0758, i0759;
  Object i0760, i0761, i0762, i0763, i0764, i0765, i0766, i0767, i0768, i0769;
  Object i0770, i0771, i0772, i0773, i0774, i0775, i0776, i0777, i0778, i0779;
  Object i0780, i0781, i0782, i0783, i0784, i0785, i0786, i0787, i0788, i0789;
  Object i0790, i0791, i0792, i0793, i0794, i0795, i0796, i0797, i0798, i0799;

  Object i0800, i0801, i0802, i0803, i0804, i0805, i0806, i0807, i0808, i0809;
  Object i0810, i0811, i0812, i0813, i0814, i0815, i0816, i0817, i0818, i0819;
  Object i0820, i0821, i0822, i0823, i0824, i0825, i0826, i0827, i0828, i0829;
  Object i0830, i0831, i0832, i0833, i0834, i0835, i0836, i0837, i0838, i0839;
  Object i0840, i0841, i0842, i0843, i0844, i0845, i0846, i0847, i0848, i0849;
  Object i0850, i0851, i0852, i0853, i0854, i0855, i0856, i0857, i0858, i0859;
  Object i0860, i0861, i0862, i0863, i0864, i0865, i0866, i0867, i0868, i0869;
  Object i0870, i0871, i0872, i0873, i0874, i0875, i0876, i0877, i0878, i0879;
  Object i0880, i0881, i0882, i0883, i0884, i0885, i0886, i0887, i0888, i0889;
  Object i0890, i0891, i0892, i0893, i0894, i0895, i0896, i0897, i0898, i0899;

  Object i0900, i0901, i0902, i0903, i0904, i0905, i0906, i0907, i0908, i0909;
  Object i0910, i0911, i0912, i0913, i0914, i0915, i0916, i0917, i0918, i0919;
  Object i0920, i0921, i0922, i0923, i0924, i0925, i0926, i0927, i0928, i0929;
  Object i0930, i0931, i0932, i0933, i0934, i0935, i0936, i0937, i0938, i0939;
  Object i0940, i0941, i0942, i0943, i0944, i0945, i0946, i0947, i0948, i0949;
  Object i0950, i0951, i0952, i0953, i0954, i0955, i0956, i0957, i0958, i0959;
  Object i0960, i0961, i0962, i0963, i0964, i0965, i0966, i0967, i0968, i0969;
  Object i0970, i0971, i0972, i0973, i0974, i0975, i0976, i0977, i0978, i0979;
  Object i0980, i0981, i0982, i0983, i0984, i0985, i0986, i0987, i0988, i0989;
  Object i0990, i0991, i0992, i0993, i0994, i0995, i0996, i0997, i0998, i0999;

  Object i1000, i1001, i1002, i1003, i1004, i1005, i1006, i1007, i1008, i1009;
  Object i1010, i1011, i1012, i1013, i1014, i1015, i1016, i1017, i1018, i1019;
  Object i1020, i1021, i1022, i1023, i1024, i1025, i1026, i1027, i1028, i1029;
  Object i1030, i1031, i1032, i1033, i1034, i1035, i1036, i1037, i1038, i1039;
  Object i1040, i1041, i1042, i1043, i1044, i1045, i1046, i1047, i1048, i1049;
  Object i1050, i1051, i1052, i1053, i1054, i1055, i1056, i1057, i1058, i1059;
  Object i1060, i1061, i1062, i1063, i1064, i1065, i1066, i1067, i1068, i1069;
  Object i1070, i1071, i1072, i1073, i1074, i1075, i1076, i1077, i1078, i1079;
  Object i1080, i1081, i1082, i1083, i1084, i1085, i1086, i1087, i1088, i1089;
  Object i1090, i1091, i1092, i1093, i1094, i1095, i1096, i1097, i1098, i1099;

  volatile Object volatileObjectField;
  volatile int volatileIntField;
  volatile long volatileWideField;

  Object objectField;
  int intField;
  long wideField;

  volatile Object putVolatileObjectField;
  volatile int putVolatileIntField;
  volatile long putVolatileWideField;

  Object putObjectField;
  int putIntField;
  long putWideField;

  static void check(NullPointerException npe, int firstLine) {
    StackTraceElement[] trace = npe.getStackTrace();
    checkElement(trace[0], "Main", "test", "Main.java", firstLine);
    checkElement(trace[1], "Main", "main", "Main.java", 179);
  }

  static void checkElement(StackTraceElement element,
                                  String declaringClass, String methodName,
                                  String fileName, int lineNumber) {
    assertEquals(declaringClass, element.getClassName());
    assertEquals(methodName, element.getMethodName());
    assertEquals(fileName, element.getFileName());
    assertEquals(lineNumber, element.getLineNumber());
  }

  static void assertEquals(Object expected, Object actual) {
    if (!expected.equals(actual)) {
      String msg = "Expected \"" + expected + "\" but got \"" + actual + "\"";
      throw new AssertionError(msg);
    }
  }

  public static void main(String[] args) {
    test();
  }

  public static void test() {
    NullPointerException npe = null;
    int thisLine = 184;

    // We do each kind of test twice, to both test the fast path and the slow path
    // of nterp.

    try {
      System.out.println($noinline$getNull().objectField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 6);

    try {
      System.out.println($noinline$getNull().objectField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().intField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().intField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().wideField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().wideField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileObjectField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileObjectField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileIntField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileIntField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileWideField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      System.out.println($noinline$getNull().volatileWideField);
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putObjectField = null;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putObjectField = null;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putIntField = 42;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putIntField = 42;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putWideField = 42L;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putWideField = 42L;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileObjectField = null;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileObjectField = null;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileIntField = 42;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileIntField = 42;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileWideField = 42L;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);

    try {
      $noinline$getNull().putVolatileWideField = 42L;
    } catch (NullPointerException e) {
      npe = e;
    }
    check(npe, thisLine += 7);
  }

  public static Main $noinline$getNull() {
    return null;
  }
}
