;;; Code for jstypeenum.Color [type definition]
(type $jstypeenum.Color.vtable (sub $java.lang.Enum.vtable (struct
 (field $$getClassImpl__java_lang_Class (ref $function.$getClassImpl__java_lang_Class))
 (field $m_equals__java_lang_Object__boolean (ref $function.m_equals__java_lang_Object__boolean))
 (field $m_hashCode__int (ref $function.m_hashCode__int))
 (field $m_toString__java_lang_String (ref $function.m_toString__java_lang_String))
 (field $m_compareTo__java_lang_Object__int (ref $function.m_compareTo__java_lang_Object__int))
 (field $m_getDeclaringClass__java_lang_Class (ref $function.m_getDeclaringClass__java_lang_Class))
 ))
)
(type $jstypeenum.Color (sub $java.lang.Enum (struct
 (field $vtable (ref $jstypeenum.Color.vtable))
 (field $itable (ref $jstypeenum.Color.itable))
 (field $$systemIdentityHashCode@java.lang.Object (mut i32))
 (field $name@java.lang.Enum (mut (ref null $java.lang.String)))
 (field $ordinal@java.lang.Enum (mut i32))
 ))
)

;;; Code for jstypeenum.Color [imports]

;;; Code for jstypeenum.Color [static fields]
(global $RED@jstypeenum.Color (mut (ref null $jstypeenum.Color))
 (ref.null $jstypeenum.Color)
)
(global $GREEN@jstypeenum.Color (mut (ref null $jstypeenum.Color))
 (ref.null $jstypeenum.Color)
)
(global $BLUE@jstypeenum.Color (mut (ref null $jstypeenum.Color))
 (ref.null $jstypeenum.Color)
)
(global $namesToValuesMap@jstypeenum.Color (mut (ref null $java.lang.Object))
 (ref.null $java.lang.Object)
)
(global $$class-initialized@jstypeenum.Color (mut i32)
 (i32.const 0)
)
(global $$class@jstypeenum.Color (mut (ref null $java.lang.Class))
 (ref.null $java.lang.Class)
)

;;; Code for jstypeenum.Color [vtable.init]
(global $jstypeenum.Color.vtable (ref $jstypeenum.Color.vtable)
 (struct.new $jstypeenum.Color.vtable
  (ref.func $$getClassImpl__java_lang_Class@jstypeenum.Color)
  (ref.func $m_equals__java_lang_Object__boolean@java.lang.Enum)
  (ref.func $m_hashCode__int@java.lang.Enum)
  (ref.func $m_toString__java_lang_String@java.lang.Enum)
  (ref.func $m_compareTo__java_lang_Object__int@java.lang.Enum)
  (ref.func $m_getDeclaringClass__java_lang_Class@java.lang.Enum)
 )
)
(global $java.lang.Comparable.vtable@$jstypeenum.Color (ref $java.lang.Comparable.vtable)
 (struct.new $java.lang.Comparable.vtable
  (ref.func $m_compareTo__java_lang_Object__int@java.lang.Enum)
 )
)
(global $java.io.Serializable.vtable@$jstypeenum.Color (ref $java.io.Serializable.vtable)
 (struct.new $java.io.Serializable.vtable
 )
)

;;; Code for jstypeenum.Color [methods]

;;; Color Color.$create(String $name, int $ordinal)
(func $$create__java_lang_String__int@jstypeenum.Color
 (param $$name (ref null $java.lang.String))
 (param $$ordinal i32)
 (result (ref null $jstypeenum.Color))
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (local $$instance (ref null $jstypeenum.Color))
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (local.set $$instance (struct.new $jstypeenum.Color (global.get $jstypeenum.Color.vtable) (global.get $jstypeenum.Color.itable) (i32.const 0) (ref.null $java.lang.String) (i32.const 0)))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (call $$ctor__java_lang_String__int__void_$p_jstypeenum_Color@jstypeenum.Color (ref.as_non_null (local.get $$instance))(local.get $$name)(local.get $$ordinal))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (return (local.get $$instance))
 )
)

;;; void Color.$ctor(String $name, int $ordinal)
(func $$ctor__java_lang_String__int__void_$p_jstypeenum_Color@jstypeenum.Color
 (param $this (ref null $jstypeenum.Color))
 (param $$name (ref null $java.lang.String))
 (param $$ordinal i32)
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (struct.set $java.lang.Enum $name@java.lang.Enum (local.get $this) (local.get $$name))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (struct.set $java.lang.Enum $ordinal@java.lang.Enum (local.get $this) (local.get $$ordinal))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (call $$ctor__java_lang_String__int__void_$p_java_lang_Enum@java.lang.Enum (ref.as_non_null (local.get $this))(local.get $$name)(local.get $$ordinal))
 )
)

;;; Color Color.valueOf(String name)
(func $m_valueOf__java_lang_String__jstypeenum_Color@jstypeenum.Color
 (param $name (ref null $java.lang.String))
 (result (ref null $jstypeenum.Color))
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (call $$clinit__void_<once>_@jstypeenum.Color )
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (if (ref.is_null (global.get $namesToValuesMap@jstypeenum.Color))
   (then
    (block
     ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
     (global.set $namesToValuesMap@jstypeenum.Color (call $m_createMapFromValues__arrayOf_java_lang_Enum__java_util_Map@javaemul.internal.Enums (call $m_values_$private__arrayOf_jstypeenum_Color@jstypeenum.Color )))
    )
   )
  )
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (return (ref.cast (ref null $jstypeenum.Color) (call $m_getValueFromNameAndMap__java_lang_String__java_util_Map__java_lang_Object@javaemul.internal.Enums (local.get $name)(global.get $namesToValuesMap@jstypeenum.Color))))
 )
)

;;; Color[] Color.values()
(func $m_values__arrayOf_jstypeenum_Color@jstypeenum.Color
 (result (ref null $javaemul.internal.WasmArray.OfObject))
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (call $$clinit__void_<once>_@jstypeenum.Color )
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (return (call $m_values_$private__arrayOf_jstypeenum_Color@jstypeenum.Color ))
 )
)

;;; Color[] Color.values_$private()
(func $m_values_$private__arrayOf_jstypeenum_Color@jstypeenum.Color
 (result (ref null $javaemul.internal.WasmArray.OfObject))
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (return (call $m_newWithLiteral__arrayOf_java_lang_Object__javaemul_internal_WasmArray_OfObject@javaemul.internal.WasmArray.OfObject (array.new_fixed $java.lang.Object.array 3 (global.get $RED@jstypeenum.Color)(global.get $GREEN@jstypeenum.Color)(global.get $BLUE@jstypeenum.Color))))
 )
)

;;; void Color.$clinit()
(func $$clinit__void_<once>_@jstypeenum.Color
 ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
 (block
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (if (global.get $$class-initialized@jstypeenum.Color)
   (then
    ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
    (return )
   )
  )
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (global.set $$class-initialized@jstypeenum.Color (i32.const 1))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:21:12
  (call $$clinit__void_<once>_@java.lang.Enum )
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:22:2
  (global.set $RED@jstypeenum.Color (call $$create__java_lang_String__int@jstypeenum.Color (call $$getString_|RED|__java_lang_String_<once>_@jstypeenum.Color )(i32.const 0)))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:23:2
  (global.set $GREEN@jstypeenum.Color (call $$create__java_lang_String__int@jstypeenum.Color (call $$getString_|GREEN|__java_lang_String_<once>_@jstypeenum.Color )(i32.const 1)))
  ;;@ transpiler/javatests/com/google/j2cl/readable/java/jstypeenum/readable-j2wasm.js/jstypeenum/Color.java:24:2
  (global.set $BLUE@jstypeenum.Color (call $$create__java_lang_String__int@jstypeenum.Color (call $$getString_|BLUE|__java_lang_String_<once>_@jstypeenum.Color )(i32.const 2)))
 )
)

;;; Class<T> Color.$getClassMetadata()
(func $$getClassMetadata__java_lang_Class_<once>_@jstypeenum.Color
 (result (ref null $java.lang.Class))
 (block
  (if (i32.eqz (ref.is_null (global.get $$class@jstypeenum.Color)))
   (then
    (return (global.get $$class@jstypeenum.Color))
   )
  )
  (global.set $$class@jstypeenum.Color (call $m_createForEnum__java_lang_String__java_lang_Class@java.lang.Class (call $$getString_|jstypeenum.C...|__java_lang_String_<once>_@jstypeenum.Color )))
  (return (global.get $$class@jstypeenum.Color))
 )
)

;;; Class<?> Color.$getClassImpl()
(func $$getClassImpl__java_lang_Class@jstypeenum.Color
 (type $function.$getClassImpl__java_lang_Class)
 (param $this.untyped (ref $java.lang.Object))
 (result (ref null $java.lang.Class))
 (local $this (ref null $jstypeenum.Color))
 (local.set $this (ref.cast (ref $jstypeenum.Color) (local.get $this.untyped)))
 (block
  (return (call $$getClassMetadata__java_lang_Class_<once>_@jstypeenum.Color ))
 )
)
(elem declare func $$getClassImpl__java_lang_Class@jstypeenum.Color)
