package bellman.graph.algorithm

import bellman.graph.Adjacency
import bellman.graph.AdjacencyList
import bellman.graph.INFINITE
import bellman.graph.Util.AdjacencyUtil.destination
import bellman.graph.Util.AdjacencyUtil.source
import bellman.graph.Util.AdjacencyUtil.weight

fun bellmanFord(adjacencyList: AdjacencyList,
                sourceVertex: Int,
                vertexNumber: Int,
                edgeNumber: Int = adjacencyList.size): IntArray {

    val distance = IntArray(vertexNumber, { INFINITE }).apply { this[sourceVertex] = 0 }

    for (i in 0..vertexNumber - 1) {
        if (!adjacencyList.relaxAll(distance))
            return distance
    }

    return distance
}

inline fun AdjacencyList.relaxAll(distance: IntArray, from: Int = 0, to: Int = lastIndex) =
        (from..to).map { get(it).relax(distance) }.onEach { if (it) return@relaxAll true }.let { false }

fun Adjacency.relax(distance: IntArray): Boolean {
    val lastValue = distance[destination]

    if (distance[source] < INFINITE) {
        distance[destination] =
                minOf(distance[destination].toLong(), distance[source].toLong() + weight).toInt()
    }

    val isRelaxed = lastValue != distance[destination]

    return isRelaxed
}

Compiled from "bellmanFord.kt"
public final class bellman.graph.algorithm.BellmanFordKt {
  public static final int[] bellmanFord(kotlin.Triple<java.lang.Integer, java.lang.Integer, java.lang.Integer>[], int, int, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String adjacencyList
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_0
       7: istore        5
       9: iload_2
      10: newarray       int
      12: astore        6
      14: iload         5
      16: iload_2
      17: if_icmpge     38
      20: iload         5
      22: istore        7
      24: aload         6
      26: iload         7
      28: invokestatic  #22                 // Method bellman/graph/UtilKt.getINFINITE:()I
      31: iastore
      32: iinc          5, 1
      35: goto          14
      38: aload         6
      40: astore        5
      42: aload         5
      44: astore        6
      46: iconst_0
      47: istore        7
      49: aload         6
      51: iload_1
      52: iconst_0
      53: iastore
      54: aload         5
      56: astore        4
      58: iconst_0
      59: istore        5
      61: iload_2
      62: iconst_1
      63: isub
      64: istore        6
      66: iload         5
      68: iload         6
      70: if_icmpgt     312
      73: aload_0
      74: astore        7
      76: iconst_0
      77: istore        8
      79: aload         7
      81: invokestatic  #28                 // Method kotlin/collections/ArraysKt.getLastIndex:([Ljava/lang/Object;)I
      84: istore        9
      86: iconst_0
      87: istore        10
      89: new           #30                 // class kotlin/ranges/IntRange
      92: dup
      93: iload         8
      95: iload         9
      97: invokespecial #34                 // Method kotlin/ranges/IntRange."<init>":(II)V
     100: checkcast     #36                 // class java/lang/Iterable
     103: astore        11
     105: iconst_0
     106: istore        12
     108: aload         11
     110: astore        13
     112: new           #38                 // class java/util/ArrayList
     115: dup
     116: aload         11
     118: bipush        10
     120: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     123: invokespecial #47                 // Method java/util/ArrayList."<init>":(I)V
     126: checkcast     #49                 // class java/util/Collection
     129: astore        14
     131: iconst_0
     132: istore        15
     134: aload         13
     136: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     141: astore        16
     143: aload         16
     145: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifeq          199
     153: aload         16
     155: checkcast     #61                 // class kotlin/collections/IntIterator
     158: invokevirtual #64                 // Method kotlin/collections/IntIterator.nextInt:()I
     161: istore        17
     163: aload         14
     165: iload         17
     167: istore        18
     169: astore        19
     171: iconst_0
     172: istore        20
     174: aload         7
     176: iload         18
     178: aaload
     179: aload         4
     181: invokestatic  #68                 // Method relax:(Lkotlin/Triple;[I)Z
     184: invokestatic  #74                 // Method java/lang/Boolean.valueOf:(Z)Ljava/lang/Boolean;
     187: aload         19
     189: swap
     190: invokeinterface #78,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     195: pop
     196: goto          143
     199: aload         14
     201: checkcast     #80                 // class java/util/List
     204: nop
     205: checkcast     #36                 // class java/lang/Iterable
     208: astore        11
     210: nop
     211: iconst_0
     212: istore        12
     214: aload         11
     216: astore        13
     218: aload         13
     220: astore        14
     222: iconst_0
     223: istore        15
     225: aload         14
     227: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     232: astore        16
     234: aload         16
     236: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     241: ifeq          279
     244: aload         16
     246: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     251: astore        17
     253: aload         17
     255: checkcast     #70                 // class java/lang/Boolean
     258: invokevirtual #87                 // Method java/lang/Boolean.booleanValue:()Z
     261: istore        18
     263: iconst_0
     264: istore        20
     266: iload         18
     268: ifeq          275
     271: iconst_1
     272: goto          293
     275: nop
     276: goto          234
     279: aload         13
     281: nop
     282: checkcast     #80                 // class java/util/List
     285: astore        12
     287: iconst_0
     288: istore        13
     290: iconst_0
     291: nop
     292: nop
     293: ifne          299
     296: aload         4
     298: areturn
     299: iload         5
     301: iload         6
     303: if_icmpeq     312
     306: iinc          5, 1
     309: goto          73
     312: aload         4
     314: areturn

  public static int[] bellmanFord$default(kotlin.Triple[], int, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: bipush        8
       4: iand
       5: ifeq          11
       8: aload_0
       9: arraylength
      10: istore_3
      11: aload_0
      12: iload_1
      13: iload_2
      14: iload_3
      15: invokestatic  #127                // Method bellmanFord:([Lkotlin/Triple;III)[I
      18: areturn

  public static final boolean relaxAll(kotlin.Triple<java.lang.Integer, java.lang.Integer, java.lang.Integer>[], int[], int, int);
    Code:
       0: aload_0
       1: ldc           #132                // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #133                // String distance
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iconst_0
      13: istore        4
      15: new           #30                 // class kotlin/ranges/IntRange
      18: dup
      19: iload_2
      20: iload_3
      21: invokespecial #34                 // Method kotlin/ranges/IntRange."<init>":(II)V
      24: checkcast     #36                 // class java/lang/Iterable
      27: astore        5
      29: iconst_0
      30: istore        6
      32: aload         5
      34: astore        7
      36: new           #38                 // class java/util/ArrayList
      39: dup
      40: aload         5
      42: bipush        10
      44: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      47: invokespecial #47                 // Method java/util/ArrayList."<init>":(I)V
      50: checkcast     #49                 // class java/util/Collection
      53: astore        8
      55: iconst_0
      56: istore        9
      58: aload         7
      60: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        10
      67: aload         10
      69: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          121
      77: aload         10
      79: checkcast     #61                 // class kotlin/collections/IntIterator
      82: invokevirtual #64                 // Method kotlin/collections/IntIterator.nextInt:()I
      85: istore        11
      87: aload         8
      89: iload         11
      91: istore        12
      93: astore        14
      95: iconst_0
      96: istore        13
      98: aload_0
      99: iload         12
     101: aaload
     102: aload_1
     103: invokestatic  #68                 // Method relax:(Lkotlin/Triple;[I)Z
     106: invokestatic  #74                 // Method java/lang/Boolean.valueOf:(Z)Ljava/lang/Boolean;
     109: aload         14
     111: swap
     112: invokeinterface #78,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          67
     121: aload         8
     123: checkcast     #80                 // class java/util/List
     126: nop
     127: checkcast     #36                 // class java/lang/Iterable
     130: astore        5
     132: nop
     133: iconst_0
     134: istore        6
     136: aload         5
     138: astore        7
     140: aload         7
     142: astore        8
     144: iconst_0
     145: istore        9
     147: aload         8
     149: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     154: astore        10
     156: aload         10
     158: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     163: ifeq          199
     166: aload         10
     168: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     173: astore        11
     175: aload         11
     177: checkcast     #70                 // class java/lang/Boolean
     180: invokevirtual #87                 // Method java/lang/Boolean.booleanValue:()Z
     183: istore        12
     185: iconst_0
     186: istore        13
     188: iload         12
     190: ifeq          195
     193: iconst_1
     194: ireturn
     195: nop
     196: goto          156
     199: aload         7
     201: nop
     202: checkcast     #80                 // class java/util/List
     205: astore        6
     207: iconst_0
     208: istore        7
     210: iconst_0
     211: nop
     212: ireturn

  public static boolean relaxAll$default(kotlin.Triple[], int[], int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_2
       3: iand
       4: ifeq          9
       7: iconst_0
       8: istore_2
       9: iload         4
      11: iconst_4
      12: iand
      13: ifeq          21
      16: aload_0
      17: invokestatic  #28                 // Method kotlin/collections/ArraysKt.getLastIndex:([Ljava/lang/Object;)I
      20: istore_3
      21: aload_0
      22: ldc           #132                // String <this>
      24: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      27: aload_1
      28: ldc           #133                // String distance
      30: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      33: iconst_0
      34: istore        4
      36: new           #30                 // class kotlin/ranges/IntRange
      39: dup
      40: iload_2
      41: iload_3
      42: invokespecial #34                 // Method kotlin/ranges/IntRange."<init>":(II)V
      45: checkcast     #36                 // class java/lang/Iterable
      48: astore        5
      50: iconst_0
      51: istore        6
      53: aload         5
      55: astore        7
      57: new           #38                 // class java/util/ArrayList
      60: dup
      61: aload         5
      63: bipush        10
      65: invokestatic  #44                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      68: invokespecial #47                 // Method java/util/ArrayList."<init>":(I)V
      71: checkcast     #49                 // class java/util/Collection
      74: astore        8
      76: iconst_0
      77: istore        9
      79: aload         7
      81: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      86: astore        10
      88: aload         10
      90: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      95: ifeq          142
      98: aload         10
     100: checkcast     #61                 // class kotlin/collections/IntIterator
     103: invokevirtual #64                 // Method kotlin/collections/IntIterator.nextInt:()I
     106: istore        11
     108: aload         8
     110: iload         11
     112: istore        12
     114: astore        14
     116: iconst_0
     117: istore        13
     119: aload_0
     120: iload         12
     122: aaload
     123: aload_1
     124: invokestatic  #68                 // Method relax:(Lkotlin/Triple;[I)Z
     127: invokestatic  #74                 // Method java/lang/Boolean.valueOf:(Z)Ljava/lang/Boolean;
     130: aload         14
     132: swap
     133: invokeinterface #78,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     138: pop
     139: goto          88
     142: aload         8
     144: checkcast     #80                 // class java/util/List
     147: nop
     148: checkcast     #36                 // class java/lang/Iterable
     151: astore        5
     153: nop
     154: iconst_0
     155: istore        6
     157: aload         5
     159: astore        7
     161: aload         7
     163: astore        8
     165: iconst_0
     166: istore        9
     168: aload         8
     170: invokeinterface #53,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     175: astore        10
     177: aload         10
     179: invokeinterface #59,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     184: ifeq          220
     187: aload         10
     189: invokeinterface #84,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     194: astore        11
     196: aload         11
     198: checkcast     #70                 // class java/lang/Boolean
     201: invokevirtual #87                 // Method java/lang/Boolean.booleanValue:()Z
     204: istore        12
     206: iconst_0
     207: istore        13
     209: iload         12
     211: ifeq          216
     214: iconst_1
     215: ireturn
     216: nop
     217: goto          177
     220: aload         7
     222: nop
     223: checkcast     #80                 // class java/util/List
     226: astore        6
     228: iconst_0
     229: istore        7
     231: iconst_0
     232: nop
     233: ireturn

  public static final boolean relax(kotlin.Triple<java.lang.Integer, java.lang.Integer, java.lang.Integer>, int[]);
    Code:
       0: aload_0
       1: ldc           #132                // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #133                // String distance
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_1
      13: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      16: aload_0
      17: invokevirtual #162                // Method bellman/graph/Util$AdjacencyUtil.getDestination:(Lkotlin/Triple;)I
      20: iaload
      21: istore_2
      22: aload_1
      23: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      26: aload_0
      27: invokevirtual #165                // Method bellman/graph/Util$AdjacencyUtil.getSource:(Lkotlin/Triple;)I
      30: iaload
      31: invokestatic  #22                 // Method bellman/graph/UtilKt.getINFINITE:()I
      34: if_icmpge     79
      37: aload_1
      38: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      41: aload_0
      42: invokevirtual #162                // Method bellman/graph/Util$AdjacencyUtil.getDestination:(Lkotlin/Triple;)I
      45: aload_1
      46: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      49: aload_0
      50: invokevirtual #162                // Method bellman/graph/Util$AdjacencyUtil.getDestination:(Lkotlin/Triple;)I
      53: iaload
      54: i2l
      55: aload_1
      56: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      59: aload_0
      60: invokevirtual #165                // Method bellman/graph/Util$AdjacencyUtil.getSource:(Lkotlin/Triple;)I
      63: iaload
      64: i2l
      65: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      68: aload_0
      69: invokevirtual #168                // Method bellman/graph/Util$AdjacencyUtil.getWeight:(Lkotlin/Triple;)I
      72: i2l
      73: ladd
      74: invokestatic  #174                // Method java/lang/Math.min:(JJ)J
      77: l2i
      78: iastore
      79: iload_2
      80: aload_1
      81: getstatic     #158                // Field bellman/graph/Util$AdjacencyUtil.INSTANCE:Lbellman/graph/Util$AdjacencyUtil;
      84: aload_0
      85: invokevirtual #162                // Method bellman/graph/Util$AdjacencyUtil.getDestination:(Lkotlin/Triple;)I
      88: iaload
      89: if_icmpeq     96
      92: iconst_1
      93: goto          97
      96: iconst_0
      97: istore_3
      98: iload_3
      99: ireturn
}


package gov.cdc.dex.hl7.model

enum class ValidationIssueCategoryType(val message: String) {
    ERROR("Error"),
    WARNING("Warning");
}

enum class ValidationIssueType(val message: String) {
    DATA_TYPE("data_type"),
    CARDINALITY("cardinality"),
    VOCAB("vocabulary"),
    SEGMENT_NOT_IN_MMG("segment_not_in_mmg"),
    OBSERVATION_SUB_ID_VIOLATION("observation_sub_id_violation"),
    DATE_CONTENT("date_content"),
    MMWR_WEEK("mmwr_week_violation")
}

enum class ValidationErrorMessage(val message: String) {
    DATA_TYPE_NOT_FOUND("Element data type not found"),
    DATA_TYPE_MISMATCH("Element data type is not matching the MMG data type"),
    CARDINALITY_UNDER("Element has less repeats than allowed by MMG cardinality"),
    CARDINALITY_OVER("Element has more repeats than allowed by MMG cardinality"),
    VOCAB_NOT_AVAILABLE("Vocabulary not available for code system code"),
    VOCAB_ISSUE("Vocabulary code system code and code concept not found in vocabulary entries"),
    SEGMENT_NOT_IN_MMG("HL7 segment found in the message that is not part of the MMG definitions"),
    OBSERVATION_SUB_ID_MISSING("Observation Sub-Id must be populated for data elements in a repeating group."),
    OBSERVATION_SUB_ID_NOT_UNIQUE("The combination of the data element identifier (OBX-3) and the observation sub-id (OBX-4) must be unique."),
    DATE_INVALID("Date/time provided is not a valid date/time"),
    WEEK_INVALID("Week provided is not a valid week")
}

data class ValidationIssue(
    val classification: ValidationIssueCategoryType,         // ERROR (for required fields) or WARNING
    val category: ValidationIssueType,                  // DATA_TYPE, CARDINALITY, VOCAB
    val fieldName: String,                          // mmg field Name
    val path: String,                            // HL7 path to extract value
    val line: Int,
    val errorMessage: ValidationErrorMessage,        // error message
    val description: String,                            // custom message to add value in question

) // .ValidationIssue

Compiled from "ValidationIssue.kt"
public final class gov.cdc.dex.hl7.model.ValidationIssue {
  private final gov.cdc.dex.hl7.model.ValidationIssueCategoryType classification;

  private final gov.cdc.dex.hl7.model.ValidationIssueType category;

  private final java.lang.String fieldName;

  private final java.lang.String path;

  private final int line;

  private final gov.cdc.dex.hl7.model.ValidationErrorMessage errorMessage;

  private final java.lang.String description;

  public gov.cdc.dex.hl7.model.ValidationIssue(gov.cdc.dex.hl7.model.ValidationIssueCategoryType, gov.cdc.dex.hl7.model.ValidationIssueType, java.lang.String, java.lang.String, int, gov.cdc.dex.hl7.model.ValidationErrorMessage, java.lang.String);
    Code:
       0: aload_1
       1: ldc           #9                  // String classification
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String category
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #19                 // String fieldName
      15: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: aload         4
      20: ldc           #21                 // String path
      22: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      25: aload         6
      27: ldc           #23                 // String errorMessage
      29: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      32: aload         7
      34: ldc           #25                 // String description
      36: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      39: aload_0
      40: invokespecial #28                 // Method java/lang/Object."<init>":()V
      43: aload_0
      44: aload_1
      45: putfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
      48: aload_0
      49: aload_2
      50: putfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      53: aload_0
      54: aload_3
      55: putfield      #37                 // Field fieldName:Ljava/lang/String;
      58: aload_0
      59: aload         4
      61: putfield      #39                 // Field path:Ljava/lang/String;
      64: aload_0
      65: iload         5
      67: putfield      #43                 // Field line:I
      70: aload_0
      71: aload         6
      73: putfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
      76: aload_0
      77: aload         7
      79: putfield      #48                 // Field description:Ljava/lang/String;
      82: return

  public final gov.cdc.dex.hl7.model.ValidationIssueCategoryType getClassification();
    Code:
       0: aload_0
       1: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
       4: areturn

  public final gov.cdc.dex.hl7.model.ValidationIssueType getCategory();
    Code:
       0: aload_0
       1: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
       4: areturn

  public final java.lang.String getFieldName();
    Code:
       0: aload_0
       1: getfield      #37                 // Field fieldName:Ljava/lang/String;
       4: areturn

  public final java.lang.String getPath();
    Code:
       0: aload_0
       1: getfield      #39                 // Field path:Ljava/lang/String;
       4: areturn

  public final int getLine();
    Code:
       0: aload_0
       1: getfield      #43                 // Field line:I
       4: ireturn

  public final gov.cdc.dex.hl7.model.ValidationErrorMessage getErrorMessage();
    Code:
       0: aload_0
       1: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
       4: areturn

  public final java.lang.String getDescription();
    Code:
       0: aload_0
       1: getfield      #48                 // Field description:Ljava/lang/String;
       4: areturn

  public final gov.cdc.dex.hl7.model.ValidationIssueCategoryType component1();
    Code:
       0: aload_0
       1: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
       4: areturn

  public final gov.cdc.dex.hl7.model.ValidationIssueType component2();
    Code:
       0: aload_0
       1: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
       4: areturn

  public final java.lang.String component3();
    Code:
       0: aload_0
       1: getfield      #37                 // Field fieldName:Ljava/lang/String;
       4: areturn

  public final java.lang.String component4();
    Code:
       0: aload_0
       1: getfield      #39                 // Field path:Ljava/lang/String;
       4: areturn

  public final int component5();
    Code:
       0: aload_0
       1: getfield      #43                 // Field line:I
       4: ireturn

  public final gov.cdc.dex.hl7.model.ValidationErrorMessage component6();
    Code:
       0: aload_0
       1: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
       4: areturn

  public final java.lang.String component7();
    Code:
       0: aload_0
       1: getfield      #48                 // Field description:Ljava/lang/String;
       4: areturn

  public final gov.cdc.dex.hl7.model.ValidationIssue copy(gov.cdc.dex.hl7.model.ValidationIssueCategoryType, gov.cdc.dex.hl7.model.ValidationIssueType, java.lang.String, java.lang.String, int, gov.cdc.dex.hl7.model.ValidationErrorMessage, java.lang.String);
    Code:
       0: aload_1
       1: ldc           #9                  // String classification
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #17                 // String category
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #19                 // String fieldName
      15: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: aload         4
      20: ldc           #21                 // String path
      22: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      25: aload         6
      27: ldc           #23                 // String errorMessage
      29: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      32: aload         7
      34: ldc           #25                 // String description
      36: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      39: new           #2                  // class gov/cdc/dex/hl7/model/ValidationIssue
      42: dup
      43: aload_1
      44: aload_2
      45: aload_3
      46: aload         4
      48: iload         5
      50: aload         6
      52: aload         7
      54: invokespecial #73                 // Method "<init>":(Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;Lgov/cdc/dex/hl7/model/ValidationIssueType;Ljava/lang/String;Ljava/lang/String;ILgov/cdc/dex/hl7/model/ValidationErrorMessage;Ljava/lang/String;)V
      57: areturn

  public static gov.cdc.dex.hl7.model.ValidationIssue copy$default(gov.cdc.dex.hl7.model.ValidationIssue, gov.cdc.dex.hl7.model.ValidationIssueCategoryType, gov.cdc.dex.hl7.model.ValidationIssueType, java.lang.String, java.lang.String, int, gov.cdc.dex.hl7.model.ValidationErrorMessage, java.lang.String, int, java.lang.Object);
    Code:
       0: iload         8
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
      11: astore_1
      12: iload         8
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      23: astore_2
      24: iload         8
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #37                 // Field fieldName:Ljava/lang/String;
      35: astore_3
      36: iload         8
      38: bipush        8
      40: iand
      41: ifeq          50
      44: aload_0
      45: getfield      #39                 // Field path:Ljava/lang/String;
      48: astore        4
      50: iload         8
      52: bipush        16
      54: iand
      55: ifeq          64
      58: aload_0
      59: getfield      #43                 // Field line:I
      62: istore        5
      64: iload         8
      66: bipush        32
      68: iand
      69: ifeq          78
      72: aload_0
      73: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
      76: astore        6
      78: iload         8
      80: bipush        64
      82: iand
      83: ifeq          92
      86: aload_0
      87: getfield      #48                 // Field description:Ljava/lang/String;
      90: astore        7
      92: aload_0
      93: aload_1
      94: aload_2
      95: aload_3
      96: aload         4
      98: iload         5
     100: aload         6
     102: aload         7
     104: invokevirtual #77                 // Method copy:(Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;Lgov/cdc/dex/hl7/model/ValidationIssueType;Ljava/lang/String;Ljava/lang/String;ILgov/cdc/dex/hl7/model/ValidationErrorMessage;Ljava/lang/String;)Lgov/cdc/dex/hl7/model/ValidationIssue;
     107: areturn

  public java.lang.String toString();
    Code:
       0: new           #80                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #81                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #83                 // String ValidationIssue(classification=
       9: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
      16: invokevirtual #90                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      19: ldc           #92                 // String , category=
      21: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      28: invokevirtual #90                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      31: ldc           #94                 // String , fieldName=
      33: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #37                 // Field fieldName:Ljava/lang/String;
      40: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      43: ldc           #96                 // String , path=
      45: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      48: aload_0
      49: getfield      #39                 // Field path:Ljava/lang/String;
      52: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      55: ldc           #98                 // String , line=
      57: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      60: aload_0
      61: getfield      #43                 // Field line:I
      64: invokevirtual #101                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      67: ldc           #103                // String , errorMessage=
      69: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      72: aload_0
      73: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
      76: invokevirtual #90                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      79: ldc           #105                // String , description=
      81: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      84: aload_0
      85: getfield      #48                 // Field description:Ljava/lang/String;
      88: invokevirtual #87                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      91: bipush        41
      93: invokevirtual #108                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      96: invokevirtual #110                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      99: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
       4: invokevirtual #115                // Method gov/cdc/dex/hl7/model/ValidationIssueCategoryType.hashCode:()I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      16: invokevirtual #118                // Method gov/cdc/dex/hl7/model/ValidationIssueType.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #37                 // Field fieldName:Ljava/lang/String;
      29: invokevirtual #121                // Method java/lang/String.hashCode:()I
      32: iadd
      33: istore_1
      34: iload_1
      35: bipush        31
      37: imul
      38: aload_0
      39: getfield      #39                 // Field path:Ljava/lang/String;
      42: invokevirtual #121                // Method java/lang/String.hashCode:()I
      45: iadd
      46: istore_1
      47: iload_1
      48: bipush        31
      50: imul
      51: aload_0
      52: getfield      #43                 // Field line:I
      55: invokestatic  #126                // Method java/lang/Integer.hashCode:(I)I
      58: iadd
      59: istore_1
      60: iload_1
      61: bipush        31
      63: imul
      64: aload_0
      65: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
      68: invokevirtual #129                // Method gov/cdc/dex/hl7/model/ValidationErrorMessage.hashCode:()I
      71: iadd
      72: istore_1
      73: iload_1
      74: bipush        31
      76: imul
      77: aload_0
      78: getfield      #48                 // Field description:Ljava/lang/String;
      81: invokevirtual #121                // Method java/lang/String.hashCode:()I
      84: iadd
      85: istore_1
      86: iload_1
      87: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class gov/cdc/dex/hl7/model/ValidationIssue
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class gov/cdc/dex/hl7/model/ValidationIssue
      20: astore_2
      21: aload_0
      22: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
      25: aload_2
      26: getfield      #31                 // Field classification:Lgov/cdc/dex/hl7/model/ValidationIssueCategoryType;
      29: if_acmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      38: aload_2
      39: getfield      #34                 // Field category:Lgov/cdc/dex/hl7/model/ValidationIssueType;
      42: if_acmpeq     47
      45: iconst_0
      46: ireturn
      47: aload_0
      48: getfield      #37                 // Field fieldName:Ljava/lang/String;
      51: aload_2
      52: getfield      #37                 // Field fieldName:Ljava/lang/String;
      55: invokestatic  #137                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      58: ifne          63
      61: iconst_0
      62: ireturn
      63: aload_0
      64: getfield      #39                 // Field path:Ljava/lang/String;
      67: aload_2
      68: getfield      #39                 // Field path:Ljava/lang/String;
      71: invokestatic  #137                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      74: ifne          79
      77: iconst_0
      78: ireturn
      79: aload_0
      80: getfield      #43                 // Field line:I
      83: aload_2
      84: getfield      #43                 // Field line:I
      87: if_icmpeq     92
      90: iconst_0
      91: ireturn
      92: aload_0
      93: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
      96: aload_2
      97: getfield      #46                 // Field errorMessage:Lgov/cdc/dex/hl7/model/ValidationErrorMessage;
     100: if_acmpeq     105
     103: iconst_0
     104: ireturn
     105: aload_0
     106: getfield      #48                 // Field description:Ljava/lang/String;
     109: aload_2
     110: getfield      #48                 // Field description:Ljava/lang/String;
     113: invokestatic  #137                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     116: ifne          121
     119: iconst_0
     120: ireturn
     121: iconst_1
     122: ireturn
}


package problem7

import java.util.Scanner
import kotlin.math.ceil
import kotlin.math.sqrt

private fun isPrime(n: Int) : Boolean {
    val maxDivider = ceil(sqrt(n.toDouble())).toInt()

    for (i in 2..maxDivider) {
        if (n % i == 0) return false
    }

    return true
}

val primeNumbers = mutableSetOf(2, 3, 5, 7, 11)

/**
 * this function create the list of prime numbers with the highest input provided as size
 * despite the fact that the list creation has a relevant complexity ...
 * ... every subsequent testcase perform the fetch with a O(1) complexity
 *
 * "someone would say BLAZINGLY FAST!" -<NAME>
 */
fun warmup(n : Int) : MutableSet<Int> {
    var candidate = 12

    while (primeNumbers.count() <= n) {

        if (isPrime(candidate)) {
            primeNumbers.add(candidate)
        }

        candidate++

    }

    return primeNumbers
}

fun getNthPrimeNumber(n : Int) : Int {
    return primeNumbers.elementAt(n - 1)
}

fun main() {
    val sc = Scanner(System.`in`)

    val numberOfInputs = sc.nextInt()

    val inputs = mutableListOf<Int>()
    for (i in 0 until numberOfInputs) {
        inputs.add(i, sc.nextInt())
    }

    // HackerRank uses older kotlin version, so you need to use the following syntax to pass the test:
    // warmup(inputs.max<Int>() ?: 0)
    warmup(inputs.maxOrNull() ?: 0)

    for (input in inputs) {
        println(getNthPrimeNumber(input))
    }
}

Compiled from "solution.kt"
public final class problem7.SolutionKt {
  private static final java.util.Set<java.lang.Integer> primeNumbers;

  private static final boolean isPrime(int);
    Code:
       0: iload_0
       1: i2d
       2: invokestatic  #12                 // Method java/lang/Math.sqrt:(D)D
       5: invokestatic  #15                 // Method java/lang/Math.ceil:(D)D
       8: d2i
       9: istore_1
      10: iconst_2
      11: istore_2
      12: iload_2
      13: iload_1
      14: if_icmpgt     36
      17: iload_0
      18: iload_2
      19: irem
      20: ifne          25
      23: iconst_0
      24: ireturn
      25: iload_2
      26: iload_1
      27: if_icmpeq     36
      30: iinc          2, 1
      33: goto          17
      36: iconst_1
      37: ireturn

  public static final java.util.Set<java.lang.Integer> getPrimeNumbers();
    Code:
       0: getstatic     #27                 // Field primeNumbers:Ljava/util/Set;
       3: areturn

  public static final java.util.Set<java.lang.Integer> warmup(int);
    Code:
       0: bipush        12
       2: istore_1
       3: getstatic     #27                 // Field primeNumbers:Ljava/util/Set;
       6: checkcast     #32                 // class java/util/Collection
       9: invokeinterface #36,  1           // InterfaceMethod java/util/Collection.size:()I
      14: iload_0
      15: if_icmpgt     44
      18: iload_1
      19: invokestatic  #38                 // Method isPrime:(I)Z
      22: ifeq          38
      25: getstatic     #27                 // Field primeNumbers:Ljava/util/Set;
      28: iload_1
      29: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      32: invokeinterface #50,  2           // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
      37: pop
      38: iinc          1, 1
      41: goto          3
      44: getstatic     #27                 // Field primeNumbers:Ljava/util/Set;
      47: areturn

  public static final int getNthPrimeNumber(int);
    Code:
       0: getstatic     #27                 // Field primeNumbers:Ljava/util/Set;
       3: checkcast     #55                 // class java/lang/Iterable
       6: iload_0
       7: iconst_1
       8: isub
       9: invokestatic  #61                 // Method kotlin/collections/CollectionsKt.elementAt:(Ljava/lang/Iterable;I)Ljava/lang/Object;
      12: checkcast     #63                 // class java/lang/Number
      15: invokevirtual #66                 // Method java/lang/Number.intValue:()I
      18: ireturn

  public static final void main();
    Code:
       0: new           #70                 // class java/util/Scanner
       3: dup
       4: getstatic     #76                 // Field java/lang/System.in:Ljava/io/InputStream;
       7: invokespecial #80                 // Method java/util/Scanner."<init>":(Ljava/io/InputStream;)V
      10: astore_0
      11: aload_0
      12: invokevirtual #83                 // Method java/util/Scanner.nextInt:()I
      15: istore_1
      16: new           #85                 // class java/util/ArrayList
      19: dup
      20: invokespecial #87                 // Method java/util/ArrayList."<init>":()V
      23: checkcast     #89                 // class java/util/List
      26: astore_2
      27: iconst_0
      28: istore_3
      29: iload_3
      30: iload_1
      31: if_icmpge     54
      34: aload_2
      35: iload_3
      36: aload_0
      37: invokevirtual #83                 // Method java/util/Scanner.nextInt:()I
      40: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      43: invokeinterface #92,  3           // InterfaceMethod java/util/List.add:(ILjava/lang/Object;)V
      48: iinc          3, 1
      51: goto          29
      54: aload_2
      55: checkcast     #55                 // class java/lang/Iterable
      58: invokestatic  #96                 // Method kotlin/collections/CollectionsKt.maxOrNull:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
      61: checkcast     #40                 // class java/lang/Integer
      64: dup
      65: ifnull        74
      68: invokevirtual #97                 // Method java/lang/Integer.intValue:()I
      71: goto          76
      74: pop
      75: iconst_0
      76: invokestatic  #99                 // Method warmup:(I)Ljava/util/Set;
      79: pop
      80: aload_2
      81: invokeinterface #103,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      86: astore_3
      87: aload_3
      88: invokeinterface #109,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      93: ifeq          128
      96: aload_3
      97: invokeinterface #113,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     102: checkcast     #63                 // class java/lang/Number
     105: invokevirtual #66                 // Method java/lang/Number.intValue:()I
     108: istore        4
     110: iload         4
     112: invokestatic  #115                // Method getNthPrimeNumber:(I)I
     115: istore        5
     117: getstatic     #119                // Field java/lang/System.out:Ljava/io/PrintStream;
     120: iload         5
     122: invokevirtual #125                // Method java/io/PrintStream.println:(I)V
     125: goto          87
     128: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #134                // Method main:()V
       3: return

  static {};
    Code:
       0: iconst_5
       1: anewarray     #40                 // class java/lang/Integer
       4: astore_0
       5: aload_0
       6: iconst_0
       7: iconst_2
       8: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      11: aastore
      12: aload_0
      13: iconst_1
      14: iconst_3
      15: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: aastore
      19: aload_0
      20: iconst_2
      21: iconst_5
      22: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: aastore
      26: aload_0
      27: iconst_3
      28: bipush        7
      30: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      33: aastore
      34: aload_0
      35: iconst_4
      36: bipush        11
      38: invokestatic  #44                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      41: aastore
      42: aload_0
      43: invokestatic  #143                // Method kotlin/collections/SetsKt.mutableSetOf:([Ljava/lang/Object;)Ljava/util/Set;
      46: putstatic     #27                 // Field primeNumbers:Ljava/util/Set;
      49: return
}


package problem4

import java.util.Scanner

private fun isPalindrome(n : Int) : Boolean {
    val straight = n.toString()
    val reversed = straight.reversed()

    return straight == reversed
}

private fun getPreviousPalindrome(n : Int) : Int {
    var prev = n
    while (! isPalindrome(prev)) prev--

    return prev
}

private fun is3DigitTermsProduct(n : Int) : Boolean {
    for (i in 111..999) {
        for (j in 111..999) {
            if (i * j == n) return true
        }
    }

    return false
}

/**
 * this solution is way better, in fact we use the nested loops only to find the product terms only for palindrome nums
 * the optimization seems to be enough to pass tests
 */
fun largestPalindromeProductV2(input : Int) : Int {
    var candidate = getPreviousPalindrome(input - 1)

    while (! is3DigitTermsProduct(candidate)) {
        candidate = getPreviousPalindrome(candidate - 1)
    }

    return candidate
}

fun main() {
    val sc = Scanner(System.`in`)

    val numberOfInputs = sc.nextInt()

    for (i in 0 until numberOfInputs) {
        val input = sc.nextInt()

        val result = largestPalindromeProductV2(input)

        println(result)
    }
}

Compiled from "solution2.kt"
public final class problem4.Solution2Kt {
  private static final boolean isPalindrome(int);
    Code:
       0: iload_0
       1: invokestatic  #12                 // Method java/lang/String.valueOf:(I)Ljava/lang/String;
       4: astore_1
       5: aload_1
       6: checkcast     #14                 // class java/lang/CharSequence
       9: invokestatic  #20                 // Method kotlin/text/StringsKt.reversed:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
      12: invokevirtual #24                 // Method java/lang/Object.toString:()Ljava/lang/String;
      15: astore_2
      16: aload_1
      17: aload_2
      18: invokestatic  #30                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      21: ireturn

  private static final int getPreviousPalindrome(int);
    Code:
       0: iload_0
       1: istore_1
       2: iload_1
       3: invokestatic  #38                 // Method isPalindrome:(I)Z
       6: ifne          15
       9: iinc          1, -1
      12: goto          2
      15: iload_1
      16: ireturn

  private static final boolean is3DigitTermsProduct(int);
    Code:
       0: bipush        111
       2: istore_1
       3: iload_1
       4: sipush        1000
       7: if_icmpge     41
      10: bipush        111
      12: istore_2
      13: iload_2
      14: sipush        1000
      17: if_icmpge     35
      20: iload_1
      21: iload_2
      22: imul
      23: iload_0
      24: if_icmpne     29
      27: iconst_1
      28: ireturn
      29: iinc          2, 1
      32: goto          13
      35: iinc          1, 1
      38: goto          3
      41: iconst_0
      42: ireturn

  public static final int largestPalindromeProductV2(int);
    Code:
       0: iload_0
       1: iconst_1
       2: isub
       3: invokestatic  #45                 // Method getPreviousPalindrome:(I)I
       6: istore_1
       7: iload_1
       8: invokestatic  #47                 // Method is3DigitTermsProduct:(I)Z
      11: ifne          24
      14: iload_1
      15: iconst_1
      16: isub
      17: invokestatic  #45                 // Method getPreviousPalindrome:(I)I
      20: istore_1
      21: goto          7
      24: iload_1
      25: ireturn

  public static final void main();
    Code:
       0: new           #53                 // class java/util/Scanner
       3: dup
       4: getstatic     #59                 // Field java/lang/System.in:Ljava/io/InputStream;
       7: invokespecial #63                 // Method java/util/Scanner."<init>":(Ljava/io/InputStream;)V
      10: astore_0
      11: aload_0
      12: invokevirtual #67                 // Method java/util/Scanner.nextInt:()I
      15: istore_1
      16: iconst_0
      17: istore_2
      18: iload_2
      19: iload_1
      20: if_icmpge     48
      23: aload_0
      24: invokevirtual #67                 // Method java/util/Scanner.nextInt:()I
      27: istore_3
      28: iload_3
      29: invokestatic  #69                 // Method largestPalindromeProductV2:(I)I
      32: istore        4
      34: getstatic     #73                 // Field java/lang/System.out:Ljava/io/PrintStream;
      37: iload         4
      39: invokevirtual #79                 // Method java/io/PrintStream.println:(I)V
      42: iinc          2, 1
      45: goto          18
      48: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #86                 // Method main:()V
       3: return
}