text:
flavor 1
srclang 3
id 65535
numfuncs 7
import "ThreadTest.mplt"
import "/home/bravewtz/Desktop/openarkcompiler/libjava-core/libjava-core.mplt"
entryfunc &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V
fileinfo {
  @INFO_filename "ThreadTest.jar"}
srcfileinfo {
  1 "ThreadTest.java"}
type $__class_meta__ <struct {
  @shadow <* void> final,
  @monitor i32 final,
  @classloader u16 final,
  @objsize u16 final,
  @itab <* void> final,
  @vtab <* void> final,
  @gctib <* void> final,
  @classinforo <* void> final,
  @clinitbridge <* void> final}>
type $__class_meta_ro__ <struct {
  @classname <* void> final,
  @ifields <* void> final,
  @methods <* void> final,
  @superclass_or_componentclass <* void> final,
  @numoffields u16 final,
  @numofmethods u16 final,
  @flag u16 final,
  @numofsuperclasses u16 final,
  @padding u32 final,
  @mod i32 final,
  @annotation i32 final,
  @clinitAddr i32 final}>
type $__method_info__ <struct {
  @method_in_vtab_index i64 final,
  @declaringclass i64 final,
  @addr i64 final,
  @mod i32 final,
  @methodname i32 final,
  @signaturename i32 final,
  @annotationvalue i32 final,
  @flag u16 final,
  @argsize u16 final,
  @padding u32 final}>
type $__method_info_compact__ <struct {
  @method_in_vtab_index i32 final,
  @addr i32 final,
  @lebPadding0 u8 final}>
type $__field_info__ <struct {
  @offset u64 final,
  @mod u32 final,
  @flag u16 final,
  @index u16 final,
  @typeName i64 final,
  @fieldname u32 final,
  @annotation u32 final,
  @declaringclass <* void> final}>
type $__field_info_compact__ <struct {
  @offset u32 final,
  @lebPadding0 u8 final}>
type $__superclass_meta__ <struct {
  @superclassinfo <* void> final}>
type $MUIDFuncDefTabEntry <struct {
  @funcUnifiedAddr u64}>
type $MUIDFuncInfTabEntry <struct {
  @funcSize u32,
  @funcName u32}>
type $MUIDFuncDefMuidTabEntry <struct {
  @muidLow u64,
  @muidHigh u64}>
type $MUIDDataDefTabEntry <struct {
  @dataUnifiedAddr u64}>
type $MUIDDataDefMuidTabEntry <struct {
  @muidLow u64,
  @muidHigh u64}>
type $MUIDUnifiedUndefTabEntry <struct {
  @globalAddress u64}>
type $MUIDUnifiedUndefMuidTabEntry <struct {
  @muidLow u64,
  @muidHigh u64}>
type $MUIDRangeTabEntry <struct {
  @tabBegin <* void>,
  @tabEnd <* void>}>
javaclass $LThreadTest_3B <$LThreadTest_3B> public
javaclass $LThreadTest_24FirstThread_3B <$LThreadTest_24FirstThread_3B>
javaclass $LThreadTest_24SecondThread_3B <$LThreadTest_24SecondThread_3B>
var $_C_STR_5ca9762cf0b6a8cb0f4e692a3a6e142c fstatic <[5] u64> readonly = [0, 0x2700000000, 0x45544e498db7b2ca, 0x5f44455450555252, 0x4547415353454d]
var $_C_STR_4f004b00 fstatic <[3] u64> readonly = [0, 0x500000000, 0x4b4f000009dc]
var $LThreadTest_3B_7Cflag i64 static volatile = 0
var $LThreadTest_3B_7Cnumber i32 static = 0
func &LThreadTest_24FirstThread_3B_7Cstart_7C_28_29V public virtual synchronized (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7Cstart_7C_28_29V public virtual synchronized (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
func &LThreadTest_24FirstThread_3B_7Cjoin_7C_28_29V final public virtual (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7Cjoin_7C_28_29V final public virtual (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
var $Ljava_2Flang_2FSystem_3B_7Cout extern <* <$Ljava_2Fio_2FPrintStream_3B>> final public static
var $__cinf_Ljava_2Flang_2FString_3B <$__class_meta__>
func &MCC_GetOrInsertLiteral () <* <$Ljava_2Flang_2FString_3B>>
var $__vtb_LThreadTest_3B fstatic <[11] <* void>> = [28, 72, 104, 116, 20, 12, 176, 24, 60, 156, 84]
var $__vtb_LThreadTest_24FirstThread_3B fstatic <[45] <* void>> = [28, 72, 104, 140, 188, 12, 176, 24, 60, 156, 84, 22, 136, 100, 4, 68, 8, 32, 132, 80, 52, 172, 112, 180, 76, 56, 16, 192, 44, 184, 164, 168, 88, 48, 148, 96, 64, 144, 40, 92, 160, 152, 108, 120, 36]
var $__itb_LThreadTest_24FirstThread_3B fstatic <[4] <* void>> = [0, 0, 0, 22]
var $__vtb_LThreadTest_24SecondThread_3B fstatic <[45] <* void>> = [28, 72, 104, 140, 188, 12, 176, 24, 60, 156, 84, 30, 136, 100, 4, 68, 8, 32, 132, 80, 52, 172, 112, 180, 76, 56, 16, 192, 44, 184, 164, 168, 88, 48, 148, 96, 64, 144, 40, 92, 160, 152, 108, 120, 36]
var $__itb_LThreadTest_24SecondThread_3B fstatic <[4] <* void>> = [0, 0, 0, 30]
var $__cinf_LThreadTest_3B <$__class_meta__> public
var $__fields_info__LThreadTest_3B fstatic <[2] <$__field_info__>> public = [[1= addrof ptr $LThreadTest_3B_7Cflag, 2= 72, 3= 0x47c0, 4= 0, 5= 76, 6= 56, 7= 84, 8= addrof ptr $__cinf_LThreadTest_3B], [1= addrof ptr $LThreadTest_3B_7Cnumber, 2= 8, 3= 0x5780, 4= 1, 5= 128, 6= 100, 7= 84, 8= addrof ptr $__cinf_LThreadTest_3B]]
var $__methods_info__LThreadTest_3B fstatic <[3] <$__method_info__>> public = [[1= 0xfff6, 2= addrof ptr $__cinf_LThreadTest_3B, 3= addroffunc ptr &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V, 4= 0x10008, 5= 136, 6= 172, 7= 84, 8= 0x2741, 9= 0, 10= 0], [1= 0xfff6, 2= addrof ptr $__cinf_LThreadTest_3B, 3= addroffunc ptr &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V, 4= 9, 5= 188, 6= 208, 7= 84, 8= 0xa201, 9= 1, 10= 0], [1= 0xfff6, 2= addrof ptr $__cinf_LThreadTest_3B, 3= addroffunc ptr &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V, 4= 0x10001, 5= 300, 6= 172, 7= 84, 8= 0xad81, 9= 1, 10= 0]]
var $__cinf_Ljava_2Flang_2FObject_3B extern <$__class_meta__> public
var $__superclasses__LThreadTest_3B fstatic <[1] <$__superclass_meta__>> public = [[1= 0x4000000000000001]]
var $__classinforo__LThreadTest_3B fstatic <$__class_meta_ro__> public = [1= 4, 2= addrof ptr $__fields_info__LThreadTest_3B, 3= addrof ptr $__methods_info__LThreadTest_3B, 4= addrof ptr $__superclasses__LThreadTest_3B, 5= 2, 6= 3, 7= 0, 8= 1, 9= 0, 10= 33, 11= 84, 12= addroffunc ptr &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V]
var $MCC_GCTIB__LThreadTest_3B fstatic <* void> public
var $classInitProtectRegion extern ptr extern
var $__cinf_LThreadTest_3B <$__class_meta__> public = [1= 0x601746118725705b, 2= 0, 3= 0xffff, 4= 0, 5= 0, 6= addrof ptr $__vtb_LThreadTest_3B, 7= addrof ptr $MCC_GCTIB__LThreadTest_3B, 8= addrof ptr $__classinforo__LThreadTest_3B, 9= addrof ptr $classInitProtectRegion]
var $__cinf_LThreadTest_24FirstThread_3B <$__class_meta__> public
var $__methods_info__LThreadTest_24FirstThread_3B fstatic <[2] <$__method_info__>> public = [[1= 0xfff6, 2= addrof ptr $__cinf_LThreadTest_24FirstThread_3B, 3= addroffunc ptr &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V, 4= 0x10000, 5= 300, 6= 172, 7= 84, 8= 0xad81, 9= 1, 10= 0], [1= 11, 2= addrof ptr $__cinf_LThreadTest_24FirstThread_3B, 3= addroffunc ptr &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V, 4= 1, 5= 428, 6= 172, 7= 84, 8= 0xcd40, 9= 1, 10= 0]]
var $__cinf_Ljava_2Flang_2FThread_3B extern <$__class_meta__> public
var $__superclasses__LThreadTest_24FirstThread_3B fstatic <[1] <$__superclass_meta__>> public = [[1= 0x4000000000000000]]
var $__classinforo__LThreadTest_24FirstThread_3B fstatic <$__class_meta_ro__> public = [1= 328, 2= 0, 3= addrof ptr $__methods_info__LThreadTest_24FirstThread_3B, 4= addrof ptr $__superclasses__LThreadTest_24FirstThread_3B, 5= 0, 6= 2, 7= 0, 8= 1, 9= 0, 10= 32, 11= 84, 12= 0]
var $MCC_GCTIB__LThreadTest_24FirstThread_3B fstatic <* void> public
var $__cinf_LThreadTest_24FirstThread_3B <$__class_meta__> public = [1= -1910748702277457663, 2= 0, 3= 0xffff, 4= 0, 5= addrof ptr $__itb_LThreadTest_24FirstThread_3B, 6= addrof ptr $__vtb_LThreadTest_24FirstThread_3B, 7= addrof ptr $MCC_GCTIB__LThreadTest_24FirstThread_3B, 8= addrof ptr $__classinforo__LThreadTest_24FirstThread_3B, 9= addrof ptr $classInitProtectRegion]
var $__cinf_LThreadTest_24SecondThread_3B <$__class_meta__> public
var $__methods_info__LThreadTest_24SecondThread_3B fstatic <[2] <$__method_info__>> public = [[1= 0xfff6, 2= addrof ptr $__cinf_LThreadTest_24SecondThread_3B, 3= addroffunc ptr &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V, 4= 0x10000, 5= 300, 6= 172, 7= 84, 8= 0xad81, 9= 1, 10= 0], [1= 11, 2= addrof ptr $__cinf_LThreadTest_24SecondThread_3B, 3= addroffunc ptr &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V, 4= 1, 5= 428, 6= 172, 7= 84, 8= 0xcd40, 9= 1, 10= 0]]
var $__superclasses__LThreadTest_24SecondThread_3B fstatic <[1] <$__superclass_meta__>> public = [[1= 0x4000000000000000]]
var $__classinforo__LThreadTest_24SecondThread_3B fstatic <$__class_meta_ro__> public = [1= 444, 2= 0, 3= addrof ptr $__methods_info__LThreadTest_24SecondThread_3B, 4= addrof ptr $__superclasses__LThreadTest_24SecondThread_3B, 5= 0, 6= 2, 7= 0, 8= 1, 9= 0, 10= 32, 11= 84, 12= 0]
var $MCC_GCTIB__LThreadTest_24SecondThread_3B fstatic <* void> public
var $__cinf_LThreadTest_24SecondThread_3B <$__class_meta__> public = [1= 0x56e06a892c2826fd, 2= 0, 3= 0xffff, 4= 0, 5= addrof ptr $__itb_LThreadTest_24SecondThread_3B, 6= addrof ptr $__vtb_LThreadTest_24SecondThread_3B, 7= addrof ptr $MCC_GCTIB__LThreadTest_24SecondThread_3B, 8= addrof ptr $__classinforo__LThreadTest_24SecondThread_3B, 9= addrof ptr $classInitProtectRegion]
var $__muid_classmetadata_bucket$$ThreadTest_jar <[3] <* void>> public = [addrof ptr $__cinf_LThreadTest_3B, addrof ptr $__cinf_LThreadTest_24FirstThread_3B, addrof ptr $__cinf_LThreadTest_24SecondThread_3B]
func &MCC_Reflect_ThrowCastException nosideeffect () void
func &MCC_Reflect_Check_Casting_NoArray nosideeffect () void
func &MCC_Reflect_Check_Casting_Array nosideeffect () void
func &MCC_CheckThrowPendingException nosideeffect () void
func &MCC_PreNativeCall (var %caller ref) <* void>
func &MCC_PostNativeCall (var %env <* void>) void
func &MCC_DecodeReference nosideeffect (var %obj ref) ref
func &MCC_CallFastNative (var %func <* void>) <* void>
func &MCC_CallSlowNative0 (var %func <* void>) <* void>
func &MCC_CallSlowNative1 (var %func <* void>) <* void>
func &MCC_CallSlowNative2 (var %func <* void>) <* void>
func &MCC_CallSlowNative3 (var %func <* void>) <* void>
func &MCC_CallSlowNative4 (var %func <* void>) <* void>
func &MCC_CallSlowNative5 (var %func <* void>) <* void>
func &MCC_CallSlowNative6 (var %func <* void>) <* void>
func &MCC_CallSlowNative7 (var %func <* void>) <* void>
func &MCC_CallSlowNative8 (var %func <* void>) <* void>
func &MCC_CallFastNativeExt (var %func <* void>) <* void>
func &MCC_CallSlowNativeExt (var %func <* void>) <* void>
func &MCC_SetReliableUnwindContext nosideeffect () void
var $__reg_jni_func_tab$$ThreadTest_jar <[0] <* void>>
var $__cinf_Ljava_2Flang_2FSystem_3B extern <$__class_meta__>
func &MCC_getFuncPtrFromItabSecondHash64 nosideeffect () ptr
var $__cinf_Ljava_2Flang_2FInterruptedException_3B extern ptr
var $__muid_func_def_tab$$ThreadTest_jar fstatic <[7] <$MUIDFuncDefTabEntry>> = [[1= addroffunc ptr &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V], [1= addroffunc ptr &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V], [1= addroffunc ptr &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V]]
var $__muid_func_inf_tab$$ThreadTest_jar fstatic <[7] <$MUIDFuncInfTabEntry>> = [[1= addroffunc ptr &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V, 2= addroffunc ptr &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V, 2= addroffunc ptr &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V], [1= addroffunc ptr &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V, 2= addroffunc ptr &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V, 2= addroffunc ptr &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V, 2= addroffunc ptr &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V], [1= addroffunc ptr &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V, 2= addroffunc ptr &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V], [1= addroffunc ptr &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V, 2= addroffunc ptr &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V]]
var $__muid_func_def_muid_tab$$ThreadTest_jar fstatic <[7] <$MUIDFuncDefMuidTabEntry>> = [[1= 0x13e812340dcd9747, 2= -4390240725891335583], [1= -6465699462723914147, 2= -3078620880440254106], [1= -5662764354190214830, 2= -3895768361636494236], [1= -1515835811489525396, 2= -2491556408962237634], [1= 0x1375bee4553224da, 2= -3022497157433240244], [1= -7260689426497094992, 2= -2683817943550545190], [1= -9025088470043148724, 2= -1511184063164969663]]
var $__muid_func_muid_idx_tab$$ThreadTest_jar fstatic <[7] u32> = [0, 2, 1, 4, 5, 3, 6]
var $__muid_data_def_tab$$ThreadTest_jar fstatic <[5] <$MUIDDataDefTabEntry>> = [[1= addrof ptr $LThreadTest_3B_7Cflag], [1= addrof ptr $LThreadTest_3B_7Cnumber], [1= addrof ptr $__cinf_LThreadTest_24FirstThread_3B], [1= addrof ptr $__cinf_LThreadTest_24SecondThread_3B], [1= addrof ptr $__cinf_LThreadTest_3B]]
var $__muid_data_def_muid_tab$$ThreadTest_jar fstatic <[5] <$MUIDDataDefMuidTabEntry>> = [[1= 0x2e4837acea6c8f18, 2= -4202138265818549454], [1= -8251186736023717379, 2= -4124130188192603885], [1= 0x542c8f5477072117, 2= -1316117149944976241], [1= -7008824318707944130, 2= -1246917843157017273], [1= -1558453601909796022, 2= -1101611014159457623]]
var $__muid_func_undef_tab$$ThreadTest_jar fstatic <[48] <$MUIDUnifiedUndefTabEntry>> = [[1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0], [1= 0]]
var $__muid_func_undef_muid_tab$$ThreadTest_jar fstatic <[48] <$MUIDUnifiedUndefMuidTabEntry>> = [[1= 0x2223b87409cad2eb, 2= -4544858217376317221], [1= 0x4fa4baf54c8ffa4c, 2= -4330908427870763329], [1= 0x3e32352aee789835, 2= -3887705395317205813], [1= 0x45d51d3a37f2eaf8, 2= -3803052163954213614], [1= -4187412136968710015, 2= -3800091941095621250], [1= 0x6742c234127e0a27, 2= -3762262047879347071], [1= 0x7230554331c55d92, 2= -3676689525926909155], [1= 0x27f27d55f7b9c5d9, 2= -3648645570896318275], [1= 0x7a67983d5ce27047, 2= -3536642499983467643], [1= -4444155200099052867, 2= -3515440642439275467], [1= -1302430067206559936, 2= -3462335513377456398], [1= 0x1c335bd3cc2bcbc5, 2= -2941286735605730226], [1= -602739002717106589, 2= -2871649643308752234], [1= 0x3ac18f49b10ae9c8, 2= -2761083912114346695], [1= -715372855679083712, 2= -2647497990906227723], [1= -7085459064379798003, 2= -2504140512675861057], [1= -5912326000629320870, 2= -2445642633367446670], [1= -7464356948810446352, 2= -2259485500590180091], [1= -8120584984539259228, 2= -2249302601425884092], [1= 0x6a5bce1d7dcfa267, 2= -2139116575755650336], [1= 0x783627f2afd1cbde, 2= -2046851302095768916], [1= -9011904582352340104, 2= -2021666714678159314], [1= -8733927297512235975, 2= -1796627844226479270], [1= 0x59ce545d6d9ab36e, 2= -1786941763209948044], [1= -587008565175255386, 2= -1765108571334409255], [1= -2701934576591406938, 2= -1693831364093527548], [1= 0x2beff4a27d3d2725, 2= -1590592096693131319], [1= 0x465af7fb7b37cebf, 2= -1370147957366279709], [1= 0x126777a7fe39e1fb, 2= -1314856249532362766], [1= 0x1e487b9899688ddc, 2= -1222088747469901692], [1= -2286157587747070287, 2= -1198859979193267183], [1= 0xbf40578f3343f7a, 2= -1198421541845410999], [1= 0x82ba7802132264b, 2= -1140277309818752746], [1= 0x16d67c99c97a7226, 2= -1118615548797384204], [1= -6517504468940763734, 2= -985898192824390983], [1= 0x4a2c12aa722ee760, 2= -969283531794502784], [1= -4151460732252162179, 2= -959188706633355145], [1= 0x524b6341e766ec9b, 2= -942822020201989684], [1= 0x7ca2bdf69a6c7c94, 2= -801329978528900548], [1= 0x7c8e2c146ebd0e05, 2= -719105873032197634], [1= 0x3e05543ea29d21a1, 2= -670103158184685825], [1= -7069492754778935884, 2= -629688729876427650], [1= -1236337316879982579, 2= -549283759455216643], [1= 0x477aafa4d7dd102b, 2= -442561182569419835], [1= 0x688cc73fd64e714e, 2= -330519468687830863], [1= 0x1c2ea56e3be7621, 2= -302634276939952847], [1= 0x54a363649fd92710, 2= -302464603624962686], [1= 0x593c3fc28ebb7385, 2= -155033466871350824]]
var $__muid_data_undef_tab$$ThreadTest_jar fstatic <[5] <$MUIDUnifiedUndefTabEntry>> = [[1= addrof ptr $__cinf_Ljava_2Flang_2FThread_3B], [1= addrof ptr $__cinf_Ljava_2Flang_2FObject_3B], [1= addrof ptr $__cinf_Ljava_2Flang_2FInterruptedException_3B], [1= addrof ptr $Ljava_2Flang_2FSystem_3B_7Cout], [1= addrof ptr $__cinf_Ljava_2Flang_2FSystem_3B]]
var $__muid_data_undef_muid_tab$$ThreadTest_jar fstatic <[5] <$MUIDUnifiedUndefMuidTabEntry>> = [[1= -2081497933309471564, 2= -4183766768174827520], [1= -567417612161374449, 2= -3298852447504547670], [1= -5803877874595771331, 2= -2832522094489880871], [1= 0x191283ac418c4bb9, 2= -1676204161023949463], [1= -5921653145571052587, 2= -171150348656858163]]
var $__muid_range_tab$$ThreadTest_jar fstatic <[29] <$MUIDRangeTabEntry>> = [[1= 0x7594c0b336c6743a, 2= -4211634493258138111], [1= 0x470db1cb78bce104, 2= -3981267291069264544], [1= 2, 2= 2], [1= 3, 2= 3], [1= 4, 2= 4], [1= 5, 2= 5], [1= 6, 2= 6], [1= 7, 2= 7], [1= 8, 2= 8], [1= 9, 2= 9], [1= 0, 2= 0], [1= 11, 2= 11], [1= 12, 2= 12], [1= 13, 2= 13], [1= 14, 2= 14], [1= 15, 2= 15], [1= addrof ptr $__muid_func_def_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_def_tab$$ThreadTest_jar], [1= 0, 2= 0], [1= addrof ptr $__muid_func_inf_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_inf_tab$$ThreadTest_jar], [1= addrof ptr $__muid_func_undef_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_undef_tab$$ThreadTest_jar], [1= addrof ptr $__muid_data_def_tab$$ThreadTest_jar, 2= addrof ptr $__muid_data_def_tab$$ThreadTest_jar], [1= 0, 2= 0], [1= addrof ptr $__muid_data_undef_tab$$ThreadTest_jar, 2= addrof ptr $__muid_data_undef_tab$$ThreadTest_jar], [1= addrof ptr $__muid_func_def_muid_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_def_muid_tab$$ThreadTest_jar], [1= addrof ptr $__muid_func_undef_muid_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_undef_muid_tab$$ThreadTest_jar], [1= addrof ptr $__muid_data_def_muid_tab$$ThreadTest_jar, 2= addrof ptr $__muid_data_def_muid_tab$$ThreadTest_jar], [1= addrof ptr $__muid_data_undef_muid_tab$$ThreadTest_jar, 2= addrof ptr $__muid_data_undef_muid_tab$$ThreadTest_jar], [1= addrof ptr $__muid_func_muid_idx_tab$$ThreadTest_jar, 2= addrof ptr $__muid_func_muid_idx_tab$$ThreadTest_jar], [1= 0, 2= 0]]
var $__reflection_strtab$$ThreadTest_jar fstatic <[137] u8> = [0, 76, 84, 104, 114, 101, 97, 100, 84, 101, 115, 116, 59, 0, 102, 108, 97, 103, 0, 74, 0, 48, 33, 48, 0, 110, 117, 109, 98, 101, 114, 0, 73, 0, 60, 99, 108, 105, 110, 105, 116, 62, 0, 40, 41, 86, 0, 109, 97, 105, 110, 0, 40, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 41, 86, 0, 60, 105, 110, 105, 116, 62, 0, 76, 84, 104, 114, 101, 97, 100, 84, 101, 115, 116, 36, 70, 105, 114, 115, 116, 84, 104, 114, 101, 97, 100, 59, 0, 114, 117, 110, 0, 76, 84, 104, 114, 101, 97, 100, 84, 101, 115, 116, 36, 83, 101, 99, 111, 110, 100, 84, 104, 114, 101, 97, 100, 59, 0]
var $__compilerVersionNum$$ThreadTest_jar <[0] <* void>> = [1, 0]
func &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V public constructor (var %_this <* <$LThreadTest_3B>>) void {
  funcid 48153
  var %Reg1_R43698 <* <$LThreadTest_3B>> localrefvar
  var %Reg1_R57 <* <$Ljava_2Flang_2FObject_3B>> localrefvar
  var %__muid_symptr <* void>

  intrinsiccall MCCIncRef (dread ref %_this)
  intrinsiccall MCCDecRef (dread ref %Reg1_R43698)
  dassign %Reg1_R43698 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  regassign ptr %1 (dread ref %Reg1_R57)
  dassign %Reg1_R57 0 (retype ref <* <$Ljava_2Flang_2FObject_3B>> (dread ref %Reg1_R43698))
  intrinsiccall MCCIncRef (dread ref %Reg1_R57)
  intrinsiccall MCCDecRef (regread ptr %1)
  #Call function:Ljava_2Flang_2FObject_3B_7C_3Cinit_3E_7C_28_29V
  dassign %__muid_symptr 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[48] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_func_undef_tab$$ThreadTest_jar, constval i64 31)))
  icallassigned (dread ptr %__muid_symptr, dread ref %Reg1_R57) {}
  #INSTIDX : 4||0004:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg1_R43698, dread ref %Reg1_R57)
  return ()
}
func &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V public static (var %Reg5_R743 <* <[] <* <$Ljava_2Flang_2FString_3B>>>>) void {
  funcid 48154
  var %Reg0_R43700 <* <$LThreadTest_24FirstThread_3B>> localrefvar
  var %Reg2_R43700 <* <$LThreadTest_24FirstThread_3B>> localrefvar
  var %Reg0_R43702 <* <$LThreadTest_24SecondThread_3B>> localrefvar
  var %Reg3_R43702 <* <$LThreadTest_24SecondThread_3B>> localrefvar
  var %Reg0_R20155 <* <$Ljava_2Flang_2FInterruptedException_3B>> localrefvar
  var %Reg4_R20155 <* <$Ljava_2Flang_2FInterruptedException_3B>> localrefvar
  var %Reg0_R562 <* <$Ljava_2Fio_2FPrintStream_3B>> localrefvar
  var %Reg1_R43 <* <$Ljava_2Flang_2FString_3B>> localrefvar
  var %L_STR_161348 <* <$Ljava_2Flang_2FString_3B>>
  var %L_STR_161349 <* <$Ljava_2Flang_2FString_3B>>
  var %__muid_symptr <* void>

  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_3B)
  #INSTIDX : 0||0000:  new
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_24FirstThread_3B)
  regassign ptr %1 (dread ref %Reg0_R43700)
  dassign %Reg0_R43700 0 (gcmalloc ref <$LThreadTest_24FirstThread_3B>)
  intrinsiccall MCCDecRef (regread ptr %1)
  #INSTIDX : 3||0003:  dup
  #INSTIDX : 4||0004:  invokespecial
  #Call function:LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V
  dassign %__muid_symptr 0 (iread ptr <* <$MUIDFuncDefTabEntry>> 1 (array 0 ptr <* <[7] <$MUIDFuncDefTabEntry>>> (addrof ptr $__muid_func_def_tab$$ThreadTest_jar, constval i64 3)))
  icallassigned (dread ptr %__muid_symptr, dread ref %Reg0_R43700) {}
  #INSTIDX : 7||0007:  astore_1
  intrinsiccall MCCIncRef (dread ref %Reg0_R43700)
  intrinsiccall MCCDecRef (dread ref %Reg2_R43700)
  dassign %Reg2_R43700 0 (dread ref %Reg0_R43700)
  #INSTIDX : 8||0008:  new
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_24SecondThread_3B)
  regassign ptr %2 (dread ref %Reg0_R43702)
  dassign %Reg0_R43702 0 (gcmalloc ref <$LThreadTest_24SecondThread_3B>)
  intrinsiccall MCCDecRef (regread ptr %2)
  #INSTIDX : 11||000b:  dup
  #INSTIDX : 12||000c:  invokespecial
  #Call function:LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V
  dassign %__muid_symptr 0 (iread ptr <* <$MUIDFuncDefTabEntry>> 1 (array 0 ptr <* <[7] <$MUIDFuncDefTabEntry>>> (addrof ptr $__muid_func_def_tab$$ThreadTest_jar, constval i64 5)))
  icallassigned (dread ptr %__muid_symptr, dread ref %Reg0_R43702) {}
  #INSTIDX : 15||000f:  astore_2
  intrinsiccall MCCIncRef (dread ref %Reg0_R43702)
  intrinsiccall MCCDecRef (dread ref %Reg3_R43702)
  dassign %Reg3_R43702 0 (dread ref %Reg0_R43702)
  #INSTIDX : 16||0010:  aload_1
  #INSTIDX : 17||0011:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg2_R43700)),
      constval u32 104)),
    dread ref %Reg2_R43700) {}
  #INSTIDX : 20||0014:  aload_2
  #INSTIDX : 21||0015:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg3_R43702)),
      constval u32 104)),
    dread ref %Reg3_R43702) {}
  try { @label0 }
  #INSTIDX : 24||0018:  aload_1
  #INSTIDX : 25||0019:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg2_R43700)),
      constval u32 240)),
    dread ref %Reg2_R43700) {}
  #INSTIDX : 28||001c:  aload_2
  #INSTIDX : 29||001d:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg3_R43702)),
      constval u32 240)),
    dread ref %Reg3_R43702) {}
  endtry
  #INSTIDX : 32||0020:  goto
  goto @label1
@label0   catch { <* <$Ljava_2Flang_2FInterruptedException_3B>> }
  intrinsiccall MCCDecRef (dread ref %Reg0_R20155)
  dassign %Reg0_R20155 0 (regread ptr %%thrownval)
  #INSTIDX : 35||0023:  astore_3
  intrinsiccall MCCIncRef (dread ref %Reg0_R20155)
  intrinsiccall MCCDecRef (dread ref %Reg4_R20155)
  dassign %Reg4_R20155 0 (dread ref %Reg0_R20155)
  #INSTIDX : 36||0024:  getstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_Ljava_2Flang_2FSystem_3B)
  regassign ptr %3 (dread ref %Reg0_R562)
  #Read from: Ljava_2Flang_2FSystem_3B_7Cout
  dassign %Reg0_R562 0 (iread ref <* <* <$Ljava_2Fio_2FPrintStream_3B>>> 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_data_undef_tab$$ThreadTest_jar, constval i64 3))))
  intrinsiccall MCCIncRef (dread ref %Reg0_R562)
  intrinsiccall MCCDecRef (regread ptr %3)
  #INSTIDX : 39||0027:  ldc
  callassigned &MCC_GetOrInsertLiteral (addrof ptr $_C_STR_5ca9762cf0b6a8cb0f4e692a3a6e142c) { dassign %L_STR_161348 0 }
  intrinsiccall MCCIncRef (dread ptr %L_STR_161348)
  intrinsiccall MCCDecRef (dread ref %Reg1_R43)
  dassign %Reg1_R43 0 (dread ptr %L_STR_161348)
  #INSTIDX : 41||0029:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg0_R562)),
      constval u32 312)),
    dread ref %Reg0_R562,
    dread ref %Reg1_R43) {}
@label1   #INSTIDX : 44||002c:  getstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_Ljava_2Flang_2FSystem_3B)
  regassign ptr %4 (dread ref %Reg0_R562)
  #Read from: Ljava_2Flang_2FSystem_3B_7Cout
  dassign %Reg0_R562 0 (iread ref <* <* <$Ljava_2Fio_2FPrintStream_3B>>> 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_data_undef_tab$$ThreadTest_jar, constval i64 3))))
  intrinsiccall MCCIncRef (dread ref %Reg0_R562)
  intrinsiccall MCCDecRef (regread ptr %4)
  #INSTIDX : 47||002f:  ldc
  callassigned &MCC_GetOrInsertLiteral (addrof ptr $_C_STR_4f004b00) { dassign %L_STR_161349 0 }
  intrinsiccall MCCIncRef (dread ptr %L_STR_161349)
  intrinsiccall MCCDecRef (dread ref %Reg1_R43)
  dassign %Reg1_R43 0 (dread ptr %L_STR_161349)
  #INSTIDX : 49||0031:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg0_R562)),
      constval u32 312)),
    dread ref %Reg0_R562,
    dread ref %Reg1_R43) {}
  #INSTIDX : 52||0034:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg0_R43700, dread ref %Reg2_R43700, dread ref %Reg0_R43702, dread ref %Reg3_R43702, dread ref %Reg0_R20155, dread ref %Reg4_R20155, dread ref %Reg0_R562, dread ref %Reg1_R43)
  return ()
}
func &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V static constructor () void {
  funcid 48155
  var %Reg0_J i64
  var %Reg0_I i32
  var %__muid_funcptr <* void>

  #INSTIDX : 0||0000:  lconst_0
  dassign %Reg0_J 0 (constval i64 0)
  #INSTIDX : 1||0001:  putstatic
  #Assign to: LThreadTest_3B_7Cflag
  dassign %__muid_funcptr 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 0)))
  iassign <* i64> 0 (dread ptr %__muid_funcptr, dread i64 %Reg0_J)
  #INSTIDX : 4||0004:  iconst_0
  dassign %Reg0_I 0 (constval i32 0)
  #INSTIDX : 5||0005:  putstatic
  #Assign to: LThreadTest_3B_7Cnumber
  dassign %__muid_funcptr 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 1)))
  iassign <* i32> 0 (dread ptr %__muid_funcptr, dread i32 %Reg0_I)
  #INSTIDX : 8||0008:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS ()
  return ()
}
func &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24FirstThread_3B>>) void {
  funcid 48156
  var %Reg1_R43700 <* <$LThreadTest_24FirstThread_3B>> localrefvar
  var %Reg1_R1610 <* <$Ljava_2Flang_2FThread_3B>> localrefvar
  var %__muid_symptr <* void>

  intrinsiccall MCCIncRef (dread ref %_this)
  intrinsiccall MCCDecRef (dread ref %Reg1_R43700)
  dassign %Reg1_R43700 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  regassign ptr %1 (dread ref %Reg1_R1610)
  dassign %Reg1_R1610 0 (retype ref <* <$Ljava_2Flang_2FThread_3B>> (dread ref %Reg1_R43700))
  intrinsiccall MCCIncRef (dread ref %Reg1_R1610)
  intrinsiccall MCCDecRef (regread ptr %1)
  #Call function:Ljava_2Flang_2FThread_3B_7C_3Cinit_3E_7C_28_29V
  dassign %__muid_symptr 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[48] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_func_undef_tab$$ThreadTest_jar, constval i64 30)))
  icallassigned (dread ptr %__muid_symptr, dread ref %Reg1_R1610) {}
  #INSTIDX : 4||0004:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg1_R43700, dread ref %Reg1_R1610)
  return ()
}
func &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24FirstThread_3B>>) void {
  funcid 48157
  var %Reg4_R43700 <* <$LThreadTest_24FirstThread_3B>> localrefvar
  var %Reg0_J i64
  var %Reg1_J i64
  var %Reg0_I i32
  var %Reg0_R562 <* <$Ljava_2Fio_2FPrintStream_3B>> localrefvar
  var %Reg1_I i32

  intrinsiccall MCCIncRef (dread ref %_this)
  intrinsiccall MCCDecRef (dread ref %Reg4_R43700)
  dassign %Reg4_R43700 0 (dread ref %_this)
@label2   #INSTIDX : 0||0000:  getstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_3B)
  #Read from: LThreadTest_3B_7Cflag
  dassign %Reg0_J 0 (iread i64 <* i64> 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 0))))
  #INSTIDX : 3||0003:  ldc2_w
  dassign %Reg1_J 0 (constval i64 0x7fffffffffffffff)
  #INSTIDX : 6||0006:  lcmp
  dassign %Reg0_I 0 (cmp i32 i64 (dread i64 %Reg0_J, dread i64 %Reg1_J))
  #INSTIDX : 7||0007:  ifeq
  brtrue @label3 (eq i32 i32 (dread i32 %Reg0_I, constval i32 0))
  #INSTIDX : 10||000a:  goto
  goto @label2
@label3   #INSTIDX : 13||000d:  getstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_Ljava_2Flang_2FSystem_3B)
  regassign ptr %1 (dread ref %Reg0_R562)
  #Read from: Ljava_2Flang_2FSystem_3B_7Cout
  dassign %Reg0_R562 0 (iread ref <* <* <$Ljava_2Fio_2FPrintStream_3B>>> 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_data_undef_tab$$ThreadTest_jar, constval i64 3))))
  intrinsiccall MCCIncRef (dread ref %Reg0_R562)
  intrinsiccall MCCDecRef (regread ptr %1)
  #INSTIDX : 16||0010:  getstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_3B)
  #Read from: LThreadTest_3B_7Cnumber
  dassign %Reg1_I 0 (iread i32 <* i32> 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 1))))
  #INSTIDX : 19||0013:  invokevirtual
  icallassigned (
    iread u64 <* u64> 0 (add ptr (
      iread ptr <* <$__class_meta__>> 6 (iread ref <* <$Ljava_2Flang_2FObject_3B>> 1 (dread ref %Reg0_R562)),
      constval u32 272)),
    dread ref %Reg0_R562,
    dread i32 %Reg1_I) {}
  #INSTIDX : 22||0016:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg4_R43700, dread ref %Reg0_R562)
  return ()
}
func &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24SecondThread_3B>>) void {
  funcid 48158
  var %Reg1_R43702 <* <$LThreadTest_24SecondThread_3B>> localrefvar
  var %Reg1_R1610 <* <$Ljava_2Flang_2FThread_3B>> localrefvar
  var %__muid_symptr <* void>

  intrinsiccall MCCIncRef (dread ref %_this)
  intrinsiccall MCCDecRef (dread ref %Reg1_R43702)
  dassign %Reg1_R43702 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  regassign ptr %1 (dread ref %Reg1_R1610)
  dassign %Reg1_R1610 0 (retype ref <* <$Ljava_2Flang_2FThread_3B>> (dread ref %Reg1_R43702))
  intrinsiccall MCCIncRef (dread ref %Reg1_R1610)
  intrinsiccall MCCDecRef (regread ptr %1)
  #Call function:Ljava_2Flang_2FThread_3B_7C_3Cinit_3E_7C_28_29V
  dassign %__muid_symptr 0 (iread ptr <* <$MUIDUnifiedUndefTabEntry>> 1 (array 0 ptr <* <[48] <$MUIDUnifiedUndefTabEntry>>> (addrof ptr $__muid_func_undef_tab$$ThreadTest_jar, constval i64 30)))
  icallassigned (dread ptr %__muid_symptr, dread ref %Reg1_R1610) {}
  #INSTIDX : 4||0004:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg1_R43702, dread ref %Reg1_R1610)
  return ()
}
func &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24SecondThread_3B>>) void {
  funcid 48159
  var %Reg2_R43702 <* <$LThreadTest_24SecondThread_3B>> localrefvar
  var %Reg0_I i32
  var %Reg0_J i64
  var %__muid_funcptr <* void>

  intrinsiccall MCCIncRef (dread ref %_this)
  intrinsiccall MCCDecRef (dread ref %Reg2_R43702)
  dassign %Reg2_R43702 0 (dread ref %_this)
  #INSTIDX : 0||0000:  bipush
  dassign %Reg0_I 0 (constval i32 42)
  #INSTIDX : 2||0002:  putstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_3B)
  #Assign to: LThreadTest_3B_7Cnumber
  dassign %__muid_funcptr 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 1)))
  iassign <* i32> 0 (dread ptr %__muid_funcptr, dread i32 %Reg0_I)
  #INSTIDX : 5||0005:  ldc2_w
  dassign %Reg0_J 0 (constval i64 0x7fffffffffffffff)
  #INSTIDX : 8||0008:  putstatic
  intrinsiccall MPL_CLINIT_CHECK (addrof ptr $__cinf_LThreadTest_3B)
  #Assign to: LThreadTest_3B_7Cflag
  dassign %__muid_funcptr 0 (iread ptr <* <$MUIDDataDefTabEntry>> 1 (array 0 ptr <* <[5] <$MUIDDataDefTabEntry>>> (addrof ptr $__muid_data_def_tab$$ThreadTest_jar, constval i64 0)))
  iassign <* i64> 0 (dread ptr %__muid_funcptr, dread i64 %Reg0_J)
  #INSTIDX : 11||000b:  return
  intrinsiccall MPL_CLEANUP_LOCALREFVARS (dread ref %Reg2_R43702)
  return ()
}

max_stars_repo_name: Bravewtz/OpenArkCompiler

max_issues_repo_name: Bravewtz/OpenArkCompiler

max_forks_repo_name: Bravewtz/OpenArkCompiler


text:
// Create a portal at each area effect cloud named ACV_Main if the location is a valid portal location.
// For each direction that should be taken into account there must be an area effect cloud located in the same block.
// The color is specified by ACV_Mains ACV_COLOR score.
// Params: area_effect_cloud named ACV_Main, area_effect_cloud tagged with ACV_Direction
process ACV_createPortals {
ACV_deleteRedundantMarkers()

ACV_validateDirections()

/scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main] add ACV_handleFailedPortals_PARAM
/execute @e[type=area_effect_cloud,tag=ACV_Direction] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main,dy=0] remove ACV_handleFailedPortals_PARAM
ACV_handleFailedPortals()
/kill @e[type=area_effect_cloud,name=ACV_Main,tag=ACV_handleFailedPortals_PARAM]

/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~ ~ ~ {CustomName:"ACV_deletePortals_PARAM",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_deletePortals_PARAM,r=0,c=1] ACV_COLOR = @e[type=area_effect_cloud,name=ACV_Main,r=0,c=1] ACV_COLOR
ACV_deletePortals()

/execute @e[type=area_effect_cloud,name=ACV_Up] ~ ~ ~ summon item_frame ~ ~-1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_Up],Facing:0b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_Down] ~ ~ ~ summon item_frame ~ ~1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_Down],Facing:0b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_South] ~ ~ ~ summon item_frame ~ ~-1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_South],Facing:0b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_East] ~ ~ ~ summon item_frame ~ ~-1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_East],Facing:3b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_North] ~ ~ ~ summon item_frame ~ ~-1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_North],Facing:2b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_West] ~ ~ ~ summon item_frame ~ ~-1 ~ {CustomName:"ACV_PortalMain",Tags:[ACV_West],Facing:1b,Invulnerable:1b}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ scoreboard players operation @e[type=item_frame,name=ACV_PortalMain,dy=-1] ACV_COLOR = @e[type=area_effect_cloud,name=ACV_Main,r=0,c=1] ACV_COLOR
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ scoreboard players operation @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down,dy=1] ACV_COLOR = @e[type=area_effect_cloud,name=ACV_Main,r=0,c=1] ACV_COLOR
ACV_spawnPortals()
ACV_texturePortals()
/kill @e[type=item_frame,name=ACV_PortalMain]

ACV_openConnections()

/testfor @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=0,score_ACV_COLOR=1]
conditional: /scoreboard players tag @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=0,score_ACV_COLOR=1] add ACV_createLightBridges_PARAM
/testfor @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=2,score_ACV_COLOR=3]
conditional: /scoreboard players tag @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=2,score_ACV_COLOR=3] add ACV_createLightBridges_PARAM
start ACV_createLightBridges

ACV_handleSuccessfulPortals()
/kill @e[type=area_effect_cloud,name=ACV_Main]
/kill @e[type=area_effect_cloud,tag=ACV_Direction]
}

// Delete all duplicate ACV_Main and the corresponding directions to prevent simultanious creation of multiple portals with the same color.
process ACV_deleteRedundantMarkers {
/scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=0,score_ACV_COLOR=0,c=1] add ACV_notRedundant
/scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=1,score_ACV_COLOR=1,c=1] add ACV_notRedundant
/scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=2,score_ACV_COLOR=2,c=1] add ACV_notRedundant
/scoreboard players tag @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=3,score_ACV_COLOR=3,c=1] add ACV_notRedundant
/kill @e[type=area_effect_cloud,name=ACV_Main,tag=!ACV_notRedundant]

/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,tag=ACV_Direction,dy=0] add ACV_notRedundant
/kill @e[type=area_effect_cloud,name=ACV_Up,tag=!ACV_notRedundant]
/kill @e[type=area_effect_cloud,name=ACV_Down,tag=!ACV_notRedundant]
/kill @e[type=area_effect_cloud,name=ACV_South,tag=!ACV_notRedundant]
/kill @e[type=area_effect_cloud,name=ACV_East,tag=!ACV_notRedundant]
/kill @e[type=area_effect_cloud,name=ACV_North,tag=!ACV_notRedundant]
/kill @e[type=area_effect_cloud,name=ACV_West,tag=!ACV_notRedundant]

/scoreboard players tag @e[type=area_effect_cloud,tag=ACV_notRedundant] remove ACV_notRedundant
}

// Spawn the area effect clouds and itemframes of a portal for each directional area effect cloud
// Params: AEC-ACV_PortalMain
// Return: AEC-ACV_PortalIn, AEC-ACV_PortalOut
process ACV_spawnPortals {
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~0.46875 summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Rotation:[0f,-90f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~0.46875 summon area_effect_cloud ~ ~ ~ {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Duration:2147483647}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~0.46875 summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Rotation:[0f,90f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~0.46875 summon area_effect_cloud ~ ~ ~ {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Duration:2147483647}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South] ~ ~ ~0.46875 summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_South],Rotation:[0f,0f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South] ~ ~ ~0.46875 summon area_effect_cloud ~ ~ ~-1 {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_South],Duration:2147483647}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East] ~0.46875 ~ ~ summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_East],Rotation:[-90f,0f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East] ~0.46875 ~ ~ summon area_effect_cloud ~-1 ~ ~ {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_East],Duration:2147483647}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North] ~ ~ ~-0.46875 summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_North],Rotation:[180f,0f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North] ~ ~ ~-0.46875 summon area_effect_cloud ~ ~ ~1 {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_North],Duration:2147483647}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West] ~-0.46875 ~ ~ summon area_effect_cloud ~ ~-0.43 ~ {CustomName:"ACV_PortalOut",Tags:[ACV_Portal,ACV_TpProof,ACV_West],Rotation:[90f,0f],Duration:2147483647}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West] ~-0.46875 ~ ~ summon area_effect_cloud ~1 ~ ~ {CustomName:"ACV_PortalIn",Tags:[ACV_Portal,ACV_TpProof,ACV_West],Duration:2147483647}

// Set the direction scores
/scoreboard players set @e[tag=ACV_Up] ACV_DIRECTION -1
/scoreboard players set @e[tag=ACV_Down] ACV_DIRECTION -2
/scoreboard players set @e[tag=ACV_South] ACV_DIRECTION 0
/scoreboard players set @e[tag=ACV_East] ACV_DIRECTION 3
/scoreboard players set @e[tag=ACV_North] ACV_DIRECTION 2
/scoreboard players set @e[tag=ACV_West] ACV_DIRECTION 1

// Set the color scores
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalOut,dy=0] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalIn,dy=0] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalIn,tag=ACV_South,dz=-1] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalIn,tag=ACV_East,dx=-1] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalIn,tag=ACV_North,dz=1] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_PortalIn,tag=ACV_West,dx=1] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West,r=0,c=1] ACV_COLOR

// Teleport the new ACV_PortalOut to it's final position
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~-0.43 ~0.46875 tp @e[type=area_effect_cloud,name=ACV_PortalOut,tag=ACV_Up,dy=0] ~ ~2 ~
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~-0.43 ~0.46875 tp @e[type=area_effect_cloud,name=ACV_PortalOut,tag=ACV_Down,dy=0] ~ ~-2 ~
}

install {
  /scoreboard teams add ACV_BluePortal
  /scoreboard teams add ACV_OrangePortal
  /scoreboard teams add ACV_PurplePortal
  /scoreboard teams add ACV_RedPortal
  /scoreboard teams option ACV_BluePortal color aqua
  /scoreboard teams option ACV_OrangePortal color gold
  /scoreboard teams option ACV_PurplePortal color dark_blue
  /scoreboard teams option ACV_RedPortal color dark_red
}

uninstall {
  /scoreboard teams remove ACV_BluePortal
  /scoreboard teams remove ACV_OrangePortal
  /scoreboard teams remove ACV_PurplePortal
  /scoreboard teams remove ACV_RedPortal
}

// Spawn the texture armorstands and itemframes of the portals and join them to their color team
// Params: AEC-ACV_PortalMain
// Return: AS-ACV_PortalDisplay, IF-ACV_PortalDisplay
process ACV_texturePortals {
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~ summon armor_stand ~-0.21 ~-1.51 ~0.7 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Rotation:[-90f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~ summon armor_stand ~-0.21 ~-1.51 ~0.25 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Rotation:[0f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~ summon armor_stand ~0.23 ~-1.51 ~0.25 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Rotation:[90f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~ summon armor_stand ~0.23 ~-1.51 ~0.7 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Up],Rotation:[180f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~ summon armor_stand ~-0.21 ~-1.95 ~0.7 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Rotation:[-90f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~ summon armor_stand ~-0.21 ~-1.95 ~0.25 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Rotation:[0f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~ summon armor_stand ~0.23 ~-1.95 ~0.25 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Rotation:[90f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~ summon armor_stand ~0.23 ~-1.95 ~0.7 {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_Down],Rotation:[180f,0f],DisabledSlots:2035728,NoGravity:1b,Invisible:1b,Invulnerable:1b}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South] ~ ~ ~ summon item_frame ~ ~ ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_South],Facing:0b,Invulnerable:1b,Glowing:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_South] ~ ~ ~ summon item_frame ~ ~1 ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_South],Facing:0b,Invulnerable:1b,Glowing:1b}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East] ~ ~ ~ summon item_frame ~ ~ ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_East],Facing:3b,Invulnerable:1b,Glowing:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_East] ~ ~ ~ summon item_frame ~ ~1 ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_East],Facing:3b,Invulnerable:1b,Glowing:1b}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North] ~ ~ ~ summon item_frame ~ ~ ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_North],Facing:2b,Invulnerable:1b,Glowing:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_North] ~ ~ ~ summon item_frame ~ ~1 ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_North],Facing:2b,Invulnerable:1b,Glowing:1b}

/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West] ~ ~ ~ summon item_frame ~ ~ ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_West],Facing:1b,Invulnerable:1b,Glowing:1b}
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_West] ~ ~ ~ summon item_frame ~ ~1 ~ {CustomName:"ACV_PortalDisplay",Tags:[ACV_Portal,ACV_TpProof,ACV_West],Facing:1b,Invulnerable:1b,Glowing:1b}

// Set the color scores
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard players operation @e[type=item_frame,name=ACV_PortalDisplay,dy=1] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up] ~ ~ ~ scoreboard players operation @e[type=armor_stand,name=ACV_PortalDisplay,tag=ACV_Up,dy=-2] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Up,r=0,c=1] ACV_COLOR
/execute @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down] ~ ~ ~ scoreboard players operation @e[type=armor_stand,name=ACV_PortalDisplay,tag=ACV_Down,dy=-2] ACV_COLOR = @e[type=item_frame,name=ACV_PortalMain,tag=ACV_Down,r=0,c=1] ACV_COLOR

// texture blue portal
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~-2 ~ entitydata @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=0,score_ACV_COLOR=0,dy=0] {ArmorItems:[{},{},{},{id:"minecraft:skull",Count:1,Damage:3,tag:{SkullOwner:{Id:"cc01bc38-881f-420e-86d9-2308d28b5840",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmRhNmZiN2RlNzFhZjMyNTZhNjEzNWRjNjQ0NDRiNTY1ZGQ5YjkxMjM5NGUyNTU0MzViOWI3ZmQxYzU4MGFiIn19fQ=="}]}}}}]}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=0,score_ACV_COLOR=0,dy=0] {Item:{Damage:0,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~1 ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=0,score_ACV_COLOR=0,dy=0] {Item:{Damage:1,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard teams join ACV_BluePortal @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=0,score_ACV_COLOR=0,dy=1]

// texture orange portal
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~-2 ~ entitydata @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=1,score_ACV_COLOR=1,dy=0] {ArmorItems:[{},{},{},{id:"minecraft:skull",Count:1,Damage:3,tag:{SkullOwner:{Id:"ff0f945d-8ef9-46f8-914d-53e0b5182a9e",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWFlOTlhMjllYTc0YzUzOTdjOTQ3YWE5ZWQyMWE2NGYxMzUxMzIzNGZjYzFkYThmZDkwYjc5NWZkOTA4NSJ9fX0="}]}}}}]}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=1,score_ACV_COLOR=1,dy=0] {Item:{Damage:2,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~1 ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=1,score_ACV_COLOR=1,dy=0] {Item:{Damage:3,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard teams join ACV_OrangePortal @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=1,score_ACV_COLOR=1,dy=1]

// texture purple portal
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~-2 ~ entitydata @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=2,score_ACV_COLOR=2,dy=0] {ArmorItems:[{},{},{},{id:"minecraft:skull",Count:1,Damage:3,tag:{SkullOwner:{Id:"f6937a89-7e05-4eb0-9928-ec8664e3d21a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTlmODI4ODgyYjIyOTZmNzU1ZjY2YjY5NWM5YjQ4NGZkMjQzYzFiZmNmMjMxMzdmMTlhYzVhNTIxN2FmZGYifX19"}]}}}}]}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=2,score_ACV_COLOR=2,dy=0] {Item:{Damage:4,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~1 ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=2,score_ACV_COLOR=2,dy=0] {Item:{Damage:5,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard teams join ACV_PurplePortal @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=2,score_ACV_COLOR=2,dy=1]

// texture red portal
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~-2 ~ entitydata @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=3,score_ACV_COLOR=3,dy=0] {ArmorItems:[{},{},{},{id:"minecraft:skull",Count:1,Damage:3,tag:{SkullOwner:{Id:"409b8064-7097-4059-b208-99f53f7d6bc3",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTIxYzg5YWM0ODI4YjcyNzllMmJlZWZkZWI1NzVjZmQ3YzEyNTU1M2VhMmMzZjZiNTNhNjUxODRlNTY4NTYifX19"}]}}}}]}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=3,score_ACV_COLOR=3,dy=0] {Item:{Damage:6,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~1 ~ entitydata @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=3,score_ACV_COLOR=3,dy=0] {Item:{Damage:7,id:"minecraft:filled_map",Count:1}}
/execute @e[type=item_frame,name=ACV_PortalMain] ~ ~ ~ scoreboard teams join ACV_RedPortal @e[type=item_frame,name=ACV_PortalDisplay,score_ACV_COLOR_min=3,score_ACV_COLOR=3,dy=1]
}

// Save the blocks that will be replaced by the portal connection
// Params: AEC-ACV_Main, AEC-ACV_PortalIn
process ACV_saveSurfaceBlocks {
ACV_loadChunks()
/execute @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=0,score_ACV_COLOR=0] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=0,score_ACV_COLOR=0] ~ ~ ~ clone ~ ~ ~ ~ ~1 ~ 0 1 0
/execute @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=1,score_ACV_COLOR=1] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=1,score_ACV_COLOR=1] ~ ~ ~ clone ~ ~ ~ ~ ~1 ~ 1 1 0
/execute @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=2,score_ACV_COLOR=2] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=2,score_ACV_COLOR=2] ~ ~ ~ clone ~ ~ ~ ~ ~1 ~ 2 1 0
/execute @e[type=area_effect_cloud,name=ACV_Main,score_ACV_COLOR_min=3,score_ACV_COLOR=3] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=3,score_ACV_COLOR=3] ~ ~ ~ clone ~ ~ ~ ~ ~1 ~ 3 1 0
}

// Open the connection between the two portals if both exist (regardless weather they are currently beeing created)
// Params: AEC-ACV_Main, AEC-ACV_PortalIn, AS-ACV_PortalDisplay
process ACV_openConnections {
ACV_saveSurfaceBlocks()

// blue and orange
/execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=0,score_ACV_COLOR=0] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=1,score_ACV_COLOR=1] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=0,score_ACV_COLOR=1] ~ ~ ~ fill ~ ~ ~ ~ ~1 ~ piston_extension
// If only one of the portals exists set the surface of horizontal portals to barrier
invert: /execute @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=0,score_ACV_COLOR=1] ~ ~ ~ setblock ~ ~2 ~ barrier

// purple and red
/execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=2,score_ACV_COLOR=2] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=3,score_ACV_COLOR=3] ~ ~ ~ execute @e[type=area_effect_cloud,name=ACV_PortalIn,score_ACV_COLOR_min=2,score_ACV_COLOR=3] ~ ~ ~ fill ~ ~ ~ ~ ~1 ~ piston_extension
// If only one of the portals exists set the surface of horizontal portals to barrier
invert: /execute @e[type=armor_stand,name=ACV_PortalDisplay,score_ACV_COLOR_min=2,score_ACV_COLOR=3] ~ ~ ~ setblock ~ ~2 ~ barrier
}

ext: mpl


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: work_gga_x *)

a5  := 133.983631:
a6  :=   3.217063:
a7  := 136.707378:
a8  :=   3.223476:
a9  :=   2.675484:
a10 :=   3.473804:

f1 := s -> (1 - a5*s^a6 + a7*s^a8)/(1 + a9*s^a10):

$include "gga_x_lag.mpl"
unassign('f'):

f := x -> f0(X2S*x) + f1(X2S*x):

max_stars_repo_name: rdietric/lsms

max_issues_repo_name: rdietric/lsms

max_forks_repo_name: rdietric/lsms


text:
main()inline{
	HideTraceLog();
	ClearTraceLog();
	once do(MapHeight()){
		do(MapWidth())
			SetTerrain(i, j, (((sin((i+j)/10.0)+1)/2.0)*5.0 * ((cos((i-j)/10.0)+1.0)/2.0)*5.0 )/25.0 * 9+1);
		delay(1);
	}
}


text:
#@ Not autoload

with(LinearAlgebra):
with(Groebner):

Q8 := table():

Q8["element_names"] := ["1","-1","i","-i","j","-j","k","-k"];
Q8["conjugacy_classes"] := [[1],[2],[3,4],[5,6],[7,8]];
Q8["character_table"] :=
 [[1$8],
  [ 1, 1,-1,-1, 1, 1,-1,-1],
  [ 1, 1, 1, 1,-1,-1,-1,-1],
  [ 1, 1,-1,-1,-1,-1, 1, 1],
  [ 2,-2, 0, 0, 0, 0, 0, 0]];
Q8["character_names"] := [1,alpha,beta,gamma,rho];

Q8["character_relations"] :=
 [alpha^2-1,beta^2-1,gamma^2-1,alpha*beta*gamma-1,
  (alpha-1)*rho,(beta-1)*rho,(gamma-1)*rho,
  rho^2-1-alpha-beta-gamma];

Q8["euler_class"] := table([
 1 = 0,
 alpha = x,
 beta = y,
 gamma = z,
 rho = c2
]):

# Morava K-theory information from the Chern approximations paper

p := 2;
n := 3;
q := p^n;

Q8["morava_K_vars"]     := plex(v,x,y,c2);
Q8["morava_K_vars_alt"] := plex(v,c2,x,y);

Q8["morava_K_rels"] := [
 c2^((q^2+q)/2),
 c2^((q^2-q)/2) * x,
 c2^((q^2-q)/2) * y,
 x^2 - v*x,
 y^2 - v*y,
 x*y - v*x - v*y - c2^q,
 v - add(c2^(q^2/2 - 2^i*(q-1)),i=0..n-1)
];

Q8["morava_K_groebner"] :=
 Basis(Q8["morava_K_rels"],Q8["morava_K_vars"],characteristic=p);

Q8["morava_K_basis"] :=
 [seq(c2^i,i=0..(q^2+q)/2-1),
  seq(c2^i*x,i=0..(q^2-q)/2-1),
  seq(c2^i*y,i=0..(q^2-q)/2-1)
 ];

Q8["vec_table"] := table():
d := nops(Q8["morava_K_basis"]):
for i from 1 to d do
 Q8["vec_table"][Q8["morava_K_basis"][i]] := [0$(i-1),1,0$(d-i)];
od:

Q8["vec"] := proc(u)
 local ub,uc;
 if u = 0 then
  return [0$d];
 elif type(u,`+`) then
  return modp(map(Q8["vec"],u),p);
 else
  if type(u,`*`) then
   uc,ub := selectremove(type,u,integer);
  else
   ub := u;
   uc := 1;
  fi;
  return modp(uc *~ Q8["vec_table"][u],p);
 fi;
end:

Q8["morava_K_groebner_alt"] :=
 Basis(Q8["morava_K_rels"],Q8["morava_K_vars_alt"],characteristic=p);

Q8["morava_K_basis_alt"] :=
 [seq(seq(seq(x^i*y^j*c2^k,k=0..3),j=0..1),i=0..7),
  seq(seq(y^j*c2^k,k=0..3),j=2..7),
  seq(c2^k,k=4..7)
 ];


text:
var $i i32 align(4) = 987
type $SS1 <struct {
  @f1 i32 volatile const,
  @f2 i32 align(8),
  @f3 i32 const } >
var $iconst1 <[4] [4] i32> const = [ [1007, 707, -273, 75], [0113, 0x4b, 75u, 75l], [75ul, 75lu, 31425926, 60223], [60223, 1619, 30, 314159]]
var $fconst1 <[4] [4] f64 > volatile = [ [1007.0, 707.0, -273.0, 75.0], [113.1, 4.0, 75.0, 75.1], [75.0, 75.1, 3.1425926, 6.02e23], [6.02e+23, 1.6e-19, 3.0, 3.14159]]
func &printf const static varargs (var %p1 <* i8 > volatile const, var %p2 <* i32> volatile)void
func &noarg varargs ( ... ) void
func $main static ( ) i32 {
   var %jj i32 volatile align(16)
   call &printf (addrof a32 $fconst1)
   return (constval i32 0) }

 # EXEC: %irbuild Main.mpl
 # EXEC: %irbuild Main.irb.mpl
 # EXEC: %cmp Main.irb.mpl Main.irb.irb.mpl

max_stars_repo_name: harmonyos-mirror/OpenArkCompiler-test

max_issues_repo_name: harmonyos-mirror/OpenArkCompiler-test

max_forks_repo_name: harmonyos-mirror/OpenArkCompiler-test


text:
repeat process ACV_portals {
/scoreboard players set @e[type=arrow,c=1] ACV_COLOR 0 {inGround:1b,damage:5.5}
/scoreboard players set @e[type=arrow,c=1] ACV_COLOR 1 {inGround:1b,damage:6.0}
/scoreboard players set @e[type=arrow,c=1] ACV_COLOR 2 {inGround:1b,damage:6.5}
/scoreboard players set @e[type=arrow,c=1] ACV_COLOR 3 {inGround:1b,damage:7.0}
/execute @e[type=arrow,score_ACV_COLOR_min=0] ~ ~ ~ summon area_effect_cloud ~ ~ ~ {CustomName:"ACV_Main",Duration:2147483647}
/execute @e[type=arrow,score_ACV_COLOR_min=0] ~ ~ ~ scoreboard players operation @e[type=area_effect_cloud,name=ACV_Main,r=0,c=1] ACV_COLOR = @e[type=arrow,score_ACV_COLOR_min=0,c=1] ACV_COLOR
/kill @e[type=arrow,score_ACV_COLOR_min=0]
conditional: start ACV_processMain
}

impulse process ACV_processMain {
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~ ~0.9 ~ {CustomName:"ACV_Up",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~ ~-1.45 ~ {CustomName:"ACV_Down",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~ ~ ~0.95 {CustomName:"ACV_South",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~0.95 ~ ~ {CustomName:"ACV_East",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~ ~ ~-0.95 {CustomName:"ACV_North",Duration:2147483647}
/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ summon area_effect_cloud ~-0.95 ~ ~ {CustomName:"ACV_West",Duration:2147483647}

/execute @e[type=area_effect_cloud,name=ACV_Main] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=!ACV_Main,dy=0] add ACV_Direction

/kill @e[type=area_effect_cloud,name=ACV_Up,tag=!ACV_Direction]
/kill @e[type=area_effect_cloud,name=ACV_Down,tag=!ACV_Direction]
/kill @e[type=area_effect_cloud,name=ACV_South,tag=!ACV_Direction]
/kill @e[type=area_effect_cloud,name=ACV_East,tag=!ACV_Direction]
/kill @e[type=area_effect_cloud,name=ACV_North,tag=!ACV_Direction]
/kill @e[type=area_effect_cloud,name=ACV_West,tag=!ACV_Direction]

/tp @e[type=area_effect_cloud,name=ACV_Down] ~ ~1 ~

ACV_createPortals()
}


text:
######################################################################
# Operad of orderings

`eta/ord` := (A::set) -> `if`(nops(A)=1,[op(A)],FAIL);

`gamma/ord` := (A::set,B::set) -> (p) -> proc(R,RR)
 local b;
 if not check_gamma_args(A,B,p,R,RR,`is_element/ord`) then
  return FAIL;
 fi;

 map(op,[seq(RR[b],b in R)]);
end;


text:
# Plotting

Plotting := module()

  description "plotting";

  # Module defined as a package (i.e.) collection of procedures
  option package, load = ModuleLoad, unload = ModuleUnLoad;

  export plot_log, plot_iter;

  local ModuleLoad, ModuleUnLoad,
        EPSI, LLL, COLORS, CONTOURPARS;

  uses plots;

  ModuleUnLoad := proc()
    NULL;
  end proc:

  ModuleLoad := proc()
    NULL;
    EPSI        := 1e-50;
    LLL         := thickness=2,style=pointline;
    COLORS      := [ "blue", "ForestGreen", "black", "DeepPink", "Goldenrod" ];
    CONTOURPARS := filledregions = true, contours=50,
                   coloring = ["LimeGreen", "Goldenrod"],
                   transparency = 0.5;
  end proc;

  ModuleLoad();

  plot_log := proc( V_list )
    local i, iii, V, A, A_list;
    A_list := [];
    iii    := 1;
    for V in V_list do
      A      := logplot( [seq([i,abs(V[i])+EPSI],i=1..nops(V))],
                         LLL, color=COLORS[iii] );
      A_list := [op(A_list), A];
      iii    := iii+1;
    end;
    display(op(A_list));
  end proc:

  plot_iter := proc( epxr, XRANGE, YRANGE, X_list )
    local i, iii, X, AA, A, A_list:
    AA := contourplot( epxr, XRANGE, YRANGE, CONTOURPARS ):
    iii := 1;
    A_list := [];
    for X in X_list do
      A := plot( [seq([X[i][1],X[i][2]],i=1..nops(X))],
                  LLL, color=COLORS[iii] ):
      A_list := [op(A_list), A];
      iii    := iii+1;
      if iii > 4 then
        iii := 1;
      end;
    end;
    display( AA, op(A_list), scaling=constrained );
  end proc:

end module:

max_stars_repo_name: ebertolazzi/NLtoolbox

max_issues_repo_name: ebertolazzi/NLtoolbox

max_forks_repo_name: ebertolazzi/NLtoolbox


text:
program GCMLCM;		/* sample17 */
var m, n, a, b, r : integer;
	gcm, lcm : integer;
begin
	writeln('Input two integers');
	readln(m, n);
	a := m;
	b := n;
	while b <> 0 do begin
		r := a - (a div b) * b;
		a := b;
		b := r
	end;
	gcm := a;
	lcm := (m div gcm) * n;
	writeln('GCM = ', gcm, '   LCM = ', lcm)
end.


text:
process ACV_deleteScoreboards {
/scoreboard objectives remove ACV_COLOR
/scoreboard objectives remove ACV_DIRECTION
/scoreboard objectives remove ACV_CONSTANT
/scoreboard objectives remove ACV_TP_FROM
/scoreboard objectives remove ACV_TP_UNEVEN
/scoreboard objectives remove ACV_TP_TO
/scoreboard objectives remove ACV_TP_IR
/scoreboard objectives remove ACV_TP_OR
/scoreboard objectives remove ACV_TP_RD
/scoreboard objectives remove ACV_CUBE_ID
/scoreboard objectives remove OnGround
}


text:
######################################################################

`is_element/cactus_planar_trees` := (A::set) -> proc(Js)
 global reason;
 local tag,J,s,sss,B,C,E,i0,i1,i2,e0,e1,e2,m,j,a;

 tag := "is_element/cactus_planar_trees";

 if A = {} then
  reason := [tag,"A is empty"];
  return false;
 fi;

 if not(type(Js,list) and nops(Js) = 2) then
  reason := [tag,"Js is not a list of length 2",Js];
  return false;
 fi;

 J,s := op(Js);

 if not(`is_element/cactus_trees`(A)(J)) then
  reason := [tag,"J is not a pre cactus tree",J,reason];
 fi;

 E := {seq(seq([a,j],a in j),j in J)};

 if not `is_element/cycord`(E)(s) then
  reason := [tag,"s is not a cyclic ordering of E",s,E];
  return false;
 fi;

 m := nops(s);
 sss := map(op,[s,s,s]);
 for i0 from 1 to m do
  e0 := s[i0];
  i1 := i0+1;
  while sss[i1][1] <> e0[1] do i1 := i1+1; od;
  e1 := sss[i1];
  i2 := i1+1;
  while sss[i2][2] <> e1[2] do i2 := i2+1; od;
  if sss[i2] <> e0 then
   reason := [tag,"bad permutation structure",s,i0,i1,i2];
  fi;
 od:
 return true;
end:

`is_equal/cactus_planar_trees` := (A::set) -> proc(Js0,Js1)
 local J0,J1,s0,s1,s2,n,i;

 J0,s0 := op(Js0);
 J1,s1 := op(Js1);

 if J0 <> J1 then return false; fi;
 if nops(s0) <> nops(s1) then return false; fi;

 n := nops(s0);
 if n = 0 then return true; fi;

 i := 1;
 while i <= n and s1[i] <> s0[1] do i := i+1; od;

 if i > n then return false; fi;
 s2 := [op(i..-1,s1),op(1..(i-1),s1)];

 return evalb (s0 = s2);
end:

######################################################################

# There is a good partial order on this set, but we have not yet
# written code for it.

`is_leq/cactus_planar_trees` := NULL:

######################################################################

`glue_cycles/cactus_planar_trees` := (A::set) -> (J) -> proc(sA,sJ)
 local fA,fJ,a,j,m,n,i,u,v,s;

 fA := table():
 fJ := table():
 for a in A do
  m := nops(sA[a]);
  for i from 1 to m do
   fA[[a,sA[a][i]]] := [a,sA[a][`if`(i<m,i+1,1)]];
  od;
 od:
 for j in J do
  m := nops(sJ[j]);
  for i from 1 to m do
   fJ[[sJ[j][i],j]] := [sJ[j][`if`(i<m,i+1,1)],j];
  od:
 od:

 u := [J[1][1],J[1]];
 v := fJ[fA[u]];
 s := u;
 n := `+`(op(map(nops,[op(J)])));
 for i from 1 to n-1 do
  s := s,v;
  v := fJ[fA[v]];
 od:

 return [s];
end:

`split_cycles/cactus_planar_trees` := (A::set) -> (J) -> proc(s)
 local sA,sJ,a,j;

 sA := table():
 sJ := table():
 for a in A do
  sA[a] := map(e -> e[2],select(e -> e[1] = a,s));
 od:
 for j in J do
  sJ[j] := map(e -> e[1],select(e -> e[2] = j,s));
 od:

 return [eval(sA),eval(sJ)];
end:

######################################################################

`list_elements/cactus_planar_trees` := proc(A::set)
 local L,M,J,JJ,a,j,SA,SJ,sA,sJ,V,W,u,v,w;

 if nops(A) = 0 then
  return [];
 elif nops(A) = 1 then
  return [[{},[]]];
 fi;

 L := `list_elements/cactus_trees`(A);
 M := NULL;
 for J in L do
  JJ := table():
  for a in A do JJ[a] := select(j -> member(a,j),J); od:
  SA := [[]]:
  for a in A do
   V := `list_elements/cycord`(JJ[a]);
   SA := [seq(seq([op(u),a = v],u in SA),v in V)];
  od:
  SA := map(table,SA);
  SJ := [[]]:
  for j in J do
   W := `list_elements/cycord`(j);
   SJ := [seq(seq([op(u),j = w],u in SJ),w in W)];
  od:
  SJ := map(table,SJ);
  M := M,seq(seq([J,`glue_cycles/cactus_planar_trees`(A)(J)(sA,sJ)],sJ in SJ),sA in SA);
 od:
 return [M];
end:

######################################################################

`count_elements/cactus_planar_trees` := NULL:

######################################################################

`random_element/cactus_planar_trees` := (A::set) -> proc()
 local J,sA,sJ,JJ,a,j,s;

 if nops(A) = 0 then
  return FAIL;
 elif nops(A) = 1 then
  return [{},[]];
 fi;

 J := `random_element/cactus_trees`(A)();
 sA := table();
 sJ := table();
 for a in A do
  JJ[a] := select(j -> member(a,j),J);
  sA[a] := `random_element/cycord`(JJ[a])();
 od;
 for j in J do
  sJ[j] := `random_element/cycord`(j)();
 od:
 s := `glue_cycles/cactus_planar_trees`(A)(J)(sA,sJ);
 return [J,s];
end:


text:
# Compute the actual repartition of nodes between the different application classes:
# We have 17784 nodes
N := 17784;
# We want 66% / 5.5% / 15.5% and 12.5% overall
workload := [.66, 0.55e-1, .155, .12];
# Each app has q[i] nodes and lasts for wall[i] hours
wall := [262.4, 64, 128, 157.2];
q := [16384*(1/16), 4096*(1/16), 32768*(1/16), 30000*(1/16)];
# ress[i] represents the CPU.h used by an application of class i
ress := [q[1]*wall[1], q[2]*wall[2], q[3]*wall[3], q[4]*wall[4]];
# t represents the resource necessary to run one app of each class
t := sum(ress[i], i = 1 .. 4);
# ressratio[i] is the proportion of CPU.h neede to run one app of class i
ressratio := [ress[1]/t, ress[2]/t, ress[3]/t, ress[4]/t];
# nratio[i] is the relative number of applications of class i to run in order to get the workload goal
nratio := [workload[1]/ressratio[1], workload[2]/ressratio[2], workload[3]/ressratio[3], workload[4]/ressratio[4]];
# m is a scaling factor so that the total number of nodes is N
m := N/evalf(sum(q[i]*nratio[i], i = 1 .. 4));
# n[i] is thus the number of applications of class i that we run in steady state
n := m*nratio;

# Waste(C, mu) computes Equation (7) of the paper
Waste := proc (C, mu)
   local P, r, Period;
   # Pi is computed for each qi/Ci following equation (8)
   P := [sqrt(2*mu*N*(q[1]/N+L)*C[1]/q[1]^2), sqrt(2*mu*N*(q[2]/N+L)*C[2]/q[2]^2), sqrt(2*mu*N*(q[3]/N+L)*C[3]/q[3]^2), sqrt(2*mu*N*(q[4]/N+L)*C[4]/q[4]^2)];
   # r is the lambda that solves equation (6), assuming we want the smallest lambda that is still positive
   r := fsolve(sum(n[i]*C[i]/P[i], i = 1 .. 4)-1 = 0, L);
   # Periodi is the numerical value corresponding to equation (8) with lambda instanciated
   Period := eval(P, L = min(0, r));
   # and we return Equation (7) for the computed Periodi
   return evalf(sum(n[i]*q[i]*(C[i]/Period[i]+q[i]*((1/2)*Period[i]+C[i])/mu)/N, i = 1 .. 4))
end proc;

# We extracted the checkpoint duration for each application class at 40 GB/s from the simulation trace
# and scale up the checkpoint time for variable bandwidth
# We convert the time in hours (as for the rest of this file)
CkptTime := proc (bw)
    return [1310.72*0.4e11/(3600*bw), 378.88*0.4e11/(3600*bw), 5734.4*0.4e11/(3600*bw), 1275*0.4e11/(3600*bw)]
end proc;

# For each bandwidth in the figure, and each MTBF in the figure, compute the theoretical waste and store it into model.dat
fd := fopen("celio.dat", WRITE);
for bw from 0.4e11 by 0.1e11 to 0.16e12 do
    for M in [1, 2, 4, 8, 16, 24] do
    	# M*N is the node MTBF in hours
        fprintf(fd, "%g\t%g\t%g\n", bw, M, Waste(CkptTime(bw), M*N))
    end do
end do;
fclose(fd);

max_stars_repo_name: SMURFSorg/InterferingCheckpoints

max_issues_repo_name: SMURFSorg/InterferingCheckpoints

max_forks_repo_name: SMURFSorg/InterferingCheckpoints


text:
`type/pN2spart` := proc(spart)
    return isSpartValid(spart);
end proc:

`type/a_indet` := proc(a) local bool;
	if convert(a,string)[1] = "a" and type(a,indexed) then bool:=true; else bool:=false; end if;
	return bool;
end proc:

`type/b_indet` := proc(a) local bool;
	if convert(a,string)[1] = "b" and type(a,indexed) then bool:=true; else bool:=false; end if;
	return bool;
end proc:
`type/z_var` := proc(expr) local bool;
	bool:=false;
	if convert(expr, string)[1]= "z" and type(expr, commutative) and nops(indets(expr)) <2 and degree(expr)=1 then bool:=true; end if;
	return bool;
end proc:

`type/AC_phi` := proc(expr) local bool;
	bool:=false;
	if convert(expr, string)[1..3] = "phi" and type(expr, anticommutative) and nops(indets(expr)) <2 then bool:= true; end if;
	return bool;
end proc:

`type/AC_theta` := proc(expr) local bool;
	bool:=false;
	if convert(expr, string)[1..3] = "the" and type(expr, anticommutative) and nops(indets(expr)) <2 then bool:= true; end if;
	return bool;
end proc:

`type/powersum_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "p[" and type(expr,indexed) then bool := true; else bool:= false; end if;
    return bool;
end proc:

`type/monomial_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "m[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/homogeneous_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "h[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/elementary_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "e[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:
`type/g_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "g[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/schur_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "s[" and convert(expr,string)[2] <> "b" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/schurEtoile_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..4] = "sEt[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/schurbar_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..5] = "sbar[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:
`type/schurbarEtoile_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..7] = "sbarEt[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/ep_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..3] = "ep[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/ph_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..3] = "ph[" and type(expr, indexed) then bool := true; else bool := false; end if;
    return bool;
end proc:

`type/jack_symbolic` := proc(expr) local bool;
	if convert(expr,string)[1..2] = "P[" and type(expr, indexed) then bool := true; else bool := false; end if;
end proc:

`type/superbase` := proc(expr) local bool;
	bool:= type(expr, monomial_symbolic) or type(expr, powersum_symbolic) or type(expr, elementary_symbolic) or type(expr, homogeneous_symbolic) or type(expr, g_symbolic) or type(expr, schur_symbolic) or type(expr, schurEtoile_symbolic) or type(expr, schurbar_symbolic) or type(expr, schurbarEtoile_symbolic) or type(expr, ep_symbolic) or type(expr, ph_symbolic) or type(expr, jack_symbolic);
	return bool;
end proc:

`type/superindexed`:= proc(expr) local bool;
	bool:= type(expr, indexed) and type([op(expr)], pN2spart);
	return bool;
end proc:

super_whattype:= proc(expr)
	local element_of_basis, sample, types, which_one, the_one;
	element_of_basis:= indets(expr, superbase);
	if nops(element_of_basis) = 0 then return other; end if;
	sample:= element_of_basis[1];
	types:= [
				powersum_symbolic,
				monomial_symbolic,
				homogeneous_symbolic,
				elementary_symbolic,
				g_symbolic,
				schur_symbolic,
				schurEtoile_symbolic,
				schurbar_symbolic,
				schurbarEtoile_symbolic,
				ep_symbolic,
				ph_symbolic,
				jack_symbolic
			];
	which_one:= map(x-> type(sample, x), types);
	the_one:= ListTools:-Search(true, which_one);
	return types[the_one];
end proc:


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: lda_exc *)
(* prefix:
  lda_xc_ksdt_params *params;

  assert(p->params != NULL);
  params = (lda_xc_ksdt_params * )(p->params);
*)

g := [2/3, -0.0139261, 0.183208]:
l := [1.064009, 0.572565]:

alpha := (t, rs) ->
      2 - (g[1] + g[2]*rs)/(1 + g[3]*rs)*exp(-t*(l[1] + l[2]*t*sqrt(rs))):

phi := (malpha, z) -> (opz_pow_n(z,malpha) + opz_pow_n(-z,malpha) - 2)/(2^malpha - 2):

lambda := (4/(9*Pi))^(1/3):
a0     := 1/(Pi*lambda):

a     := [0.750, 3.043630, -0.0922700, 1.703500, 8.310510, 5.11050]:

aa := t -> a0*tanh(1/t)*(a[1] + a[2]*t^2 + a[3]*t^3 + a[4]*t^4)/(1 + a[5]*t^2 + a[6]*t^4):
bb := (b, t) -> tanh(1/sqrt(t))*(b[1] + b[2]*t^2 + b[3]*t^4)/(1 + b[4]*t^2 + b[5]*t^4):
dd := (d, t) -> bb(d, t):
ee := (e, t) -> tanh(1/t)*(e[1] + e[2]*t^2 + e[3]*t^4)/(1 + e[4]*t^2 + e[5]*t^4):
cc := (c, e, t) -> (c[1] + c[2]*exp(-c[3]/t))*ee(e, t):

fxc := (omega, b, c, d, e, rs, t) ->
    -(omega*aa(t) + bb(b, t)*sqrt(rs) + cc(c, e, t)*rs)/(rs*(1 + dd(d, t)*sqrt(rs) + ee(e, t)*rs)):

# (T/T_F)*opz_pow_n(z,2/3)
mtt := (rs, z) ->
    2*(4/(9*Pi))^(2/3)*params_a_T*rs^2*(1 + params_a_thetaParam*z)^(2/3):

f := (rs, z) ->
  + fxc(1,
        params_a_b_0_, params_a_c_0_, params_a_d_0_, params_a_e_0_,
        rs, mtt(rs, z))*(1 - phi(alpha(mtt(rs, z), rs), z))
  + fxc(2^(1/3),
        params_a_b_1_, params_a_c_1_, params_a_d_1_, params_a_e_1_,
        rs, mtt(rs, z)/2^(2/3))*phi(alpha(mtt(rs, z), rs), z):


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: mgga_vxc *)

(* prefix:
  mgga_x_tb09_params *params;

  assert(p->params != NULL);
  params = (mgga_x_tb09_params * ) (p->params);
*)

(* replace: "br89_x\(" -> "xc_mgga_x_br89_get_x(" *)

$include "mgga_x_br89.mpl"

params_a_gamma := 0.8:
tb09_c_HEG := (3*params_a_c - 2)*sqrt(5/12)/(Pi):

# we add here a threshold of 1e-10 for either tau or the Fermi curvature
tb09_f := (rs, z, x, u, t) -> (params_a_c*X_FACTOR_C*br89_v(br89_x(br89_cQ(br89_Q(x, u, t))))
  + tb09_c_HEG*sqrt(2*m_max(t - params_a_alpha*x^2/8, 1e-10)))*n_spin(rs, z)^(1/3):

f := (rs, z, xt, xs0, xs1, u0, u1, t0, t1) ->
  tb09_f(rs, z, xs0, u0, t0):


text:
input := StringTools:-Trim(FileTools:-Text:-ReadFile("AoC-2021-15-input.txt"));
grid := Matrix(map(s->parse~(StringTools:-Explode(s)),StringTools:-Split(input,"\n"))):

(gridw,gridl) := upperbound(grid);

nbs := proc(i,j,gridsize)
local out := NULL;
    if i < gridsize then out := out, [i+1, j]; end if;
    if j < gridsize then out := out, [i, j+1]; end if;
    if i > 1 then out := out, [i-1,j]; end if;
    if j > 1 then out := out, [i, j-1]; end if;
    return [out];
end proc:

# should really do this lazily
inc := a -> (a mod 9) +~ 1;
biggrid:= Matrix([seq([seq((inc@@(i+j-2))(grid),j=1..5)],i=1..5)] );
(biggridw,biggridl) := upperbound(biggrid);

with(GraphTheory):
G := MakeWeighted(MakeDirected(SpecialGraphs:-GridGraph(gridl,gridw)));
for e in Edges(G) do
    SetEdgeWeight(G, e, grid[parse(e[2])]);
end do:
DijkstrasAlgorithm(G, "1,1", cat("",gridl,",",gridw))[2];

BG := MakeWeighted(MakeDirected(SpecialGraphs:-GridGraph(biggridl,biggridw)));
for i from 1 to biggridl do
    for j from 1 to biggridw do
       a := j + (i-1)*(biggridw);
       for n in nbs(i,j,biggridw) do
           b := n[2] + (n[1]-1)*biggridw;
           W[b,a] := biggrid[i,j];
       end do;
    end do;
end do:
DijkstrasAlgorithm(BG, "1,1", cat("",biggridl,",",biggridw))[2];


text:
flavor 1
srclang 3
id 65535
numfuncs 7
import "ThreadTest.mplt"
import "/home/bravewtz/Desktop/openarkcompiler/libjava-core/libjava-core.mplt"
entryfunc &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V
fileinfo {
  @INFO_filename "ThreadTest.jar"}
srcfileinfo {
  1 "ThreadTest.java"}
javaclass $LThreadTest_3B <$LThreadTest_3B> public
javaclass $LThreadTest_24FirstThread_3B <$LThreadTest_24FirstThread_3B>
javaclass $LThreadTest_24SecondThread_3B <$LThreadTest_24SecondThread_3B>
func &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V public constructor (var %_this <* <$LThreadTest_3B>>) void
func &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V public static (var %Reg5_R743 <* <[] <* <$Ljava_2Flang_2FString_3B>>>>) void
func &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V static constructor () void
func &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
var $_C_STR_5ca9762cf0b6a8cb0f4e692a3a6e142c fstatic <[5] u64> readonly = [0, 0x2700000000, 0x45544e498db7b2ca, 0x5f44455450555252, 0x4547415353454d]
var $_C_STR_4f004b00 fstatic <[3] u64> readonly = [0, 0x500000000, 0x4b4f000009dc]
var $LThreadTest_3B_7Cflag i64 static volatile = 0
var $LThreadTest_3B_7Cnumber i32 static = 0
func &LThreadTest_24FirstThread_3B_7Cstart_7C_28_29V public virtual synchronized (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7Cstart_7C_28_29V public virtual synchronized (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
func &LThreadTest_24FirstThread_3B_7Cjoin_7C_28_29V final public virtual (var %_this <* <$LThreadTest_24FirstThread_3B>>) void
func &LThreadTest_24SecondThread_3B_7Cjoin_7C_28_29V final public virtual (var %_this <* <$LThreadTest_24SecondThread_3B>>) void
var $Ljava_2Flang_2FSystem_3B_7Cout extern <* <$Ljava_2Fio_2FPrintStream_3B>> final public static
var $__cinf_Ljava_2Flang_2FString_3B <$__class_meta__>
func &MCC_GetOrInsertLiteral () <* <$Ljava_2Flang_2FString_3B>>
func &LThreadTest_3B_7C_3Cinit_3E_7C_28_29V public constructor (var %_this <* <$LThreadTest_3B>>) void {
  funcid 48153
  var %Reg1_R43698 <* <$LThreadTest_3B>>
  var %Reg1_R57 <* <$Ljava_2Flang_2FObject_3B>>

  dassign %Reg1_R43698 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  dassign %Reg1_R57 0 (retype ref <* <$Ljava_2Flang_2FObject_3B>> (dread ref %Reg1_R43698))
  callassigned &Ljava_2Flang_2FObject_3B_7C_3Cinit_3E_7C_28_29V (dread ref %Reg1_R57) {}
  #INSTIDX : 4||0004:  return
  return ()
}
func &LThreadTest_3B_7Cmain_7C_28ALjava_2Flang_2FString_3B_29V public static (var %Reg5_R743 <* <[] <* <$Ljava_2Flang_2FString_3B>>>>) void {
  funcid 48154
  var %Reg0_R43700 <* <$LThreadTest_24FirstThread_3B>>
  var %Reg2_R43700 <* <$LThreadTest_24FirstThread_3B>>
  var %Reg0_R43702 <* <$LThreadTest_24SecondThread_3B>>
  var %Reg3_R43702 <* <$LThreadTest_24SecondThread_3B>>
  var %Reg0_R20155 <* <$Ljava_2Flang_2FInterruptedException_3B>>
  var %Reg4_R20155 <* <$Ljava_2Flang_2FInterruptedException_3B>>
  var %Reg0_R562 <* <$Ljava_2Fio_2FPrintStream_3B>>
  var %Reg1_R43 <* <$Ljava_2Flang_2FString_3B>>
  var %L_STR_161348 <* <$Ljava_2Flang_2FString_3B>>
  var %L_STR_161349 <* <$Ljava_2Flang_2FString_3B>>

  intrinsiccallwithtype <$LThreadTest_3B> JAVA_CLINIT_CHECK ()
  #INSTIDX : 0||0000:  new
  intrinsiccallwithtype <$LThreadTest_24FirstThread_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_R43700 0 (gcmalloc ref <$LThreadTest_24FirstThread_3B>)
  #INSTIDX : 3||0003:  dup
  #INSTIDX : 4||0004:  invokespecial
  callassigned &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V (dread ref %Reg0_R43700) {}
  #INSTIDX : 7||0007:  astore_1
  dassign %Reg2_R43700 0 (dread ref %Reg0_R43700)
  #INSTIDX : 8||0008:  new
  intrinsiccallwithtype <$LThreadTest_24SecondThread_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_R43702 0 (gcmalloc ref <$LThreadTest_24SecondThread_3B>)
  #INSTIDX : 11||000b:  dup
  #INSTIDX : 12||000c:  invokespecial
  callassigned &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V (dread ref %Reg0_R43702) {}
  #INSTIDX : 15||000f:  astore_2
  dassign %Reg3_R43702 0 (dread ref %Reg0_R43702)
  #INSTIDX : 16||0010:  aload_1
  #INSTIDX : 17||0011:  invokevirtual
  virtualcallassigned &LThreadTest_24FirstThread_3B_7Cstart_7C_28_29V (dread ref %Reg2_R43700) {}
  #INSTIDX : 20||0014:  aload_2
  #INSTIDX : 21||0015:  invokevirtual
  virtualcallassigned &LThreadTest_24SecondThread_3B_7Cstart_7C_28_29V (dread ref %Reg3_R43702) {}
  try { @label0 }
  #INSTIDX : 24||0018:  aload_1
  #INSTIDX : 25||0019:  invokevirtual
  virtualcallassigned &LThreadTest_24FirstThread_3B_7Cjoin_7C_28_29V (dread ref %Reg2_R43700) {}
  #INSTIDX : 28||001c:  aload_2
  #INSTIDX : 29||001d:  invokevirtual
  virtualcallassigned &LThreadTest_24SecondThread_3B_7Cjoin_7C_28_29V (dread ref %Reg3_R43702) {}
  endtry
  #INSTIDX : 32||0020:  goto
  goto @label1
@label0   catch { <* <$Ljava_2Flang_2FInterruptedException_3B>> }
  dassign %Reg0_R20155 0 (regread ptr %%thrownval)
  #INSTIDX : 35||0023:  astore_3
  dassign %Reg4_R20155 0 (dread ref %Reg0_R20155)
  #INSTIDX : 36||0024:  getstatic
  intrinsiccallwithtype <$Ljava_2Flang_2FSystem_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_R562 0 (dread ref $Ljava_2Flang_2FSystem_3B_7Cout)
  #INSTIDX : 39||0027:  ldc
  callassigned &MCC_GetOrInsertLiteral (addrof ptr $_C_STR_5ca9762cf0b6a8cb0f4e692a3a6e142c) { dassign %L_STR_161348 0 }
  dassign %Reg1_R43 0 (dread ptr %L_STR_161348)
  #INSTIDX : 41||0029:  invokevirtual
  virtualcallassigned &Ljava_2Fio_2FPrintStream_3B_7Cprintln_7C_28Ljava_2Flang_2FString_3B_29V (dread ref %Reg0_R562, dread ref %Reg1_R43) {}
@label1   #INSTIDX : 44||002c:  getstatic
  intrinsiccallwithtype <$Ljava_2Flang_2FSystem_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_R562 0 (dread ref $Ljava_2Flang_2FSystem_3B_7Cout)
  #INSTIDX : 47||002f:  ldc
  callassigned &MCC_GetOrInsertLiteral (addrof ptr $_C_STR_4f004b00) { dassign %L_STR_161349 0 }
  dassign %Reg1_R43 0 (dread ptr %L_STR_161349)
  #INSTIDX : 49||0031:  invokevirtual
  virtualcallassigned &Ljava_2Fio_2FPrintStream_3B_7Cprintln_7C_28Ljava_2Flang_2FString_3B_29V (dread ref %Reg0_R562, dread ref %Reg1_R43) {}
  #INSTIDX : 52||0034:  return
  return ()
}
func &LThreadTest_3B_7C_3Cclinit_3E_7C_28_29V static constructor () void {
  funcid 48155
  var %Reg0_J i64
  var %Reg0_I i32

  #INSTIDX : 0||0000:  lconst_0
  dassign %Reg0_J 0 (constval i64 0)
  #INSTIDX : 1||0001:  putstatic
  dassign $LThreadTest_3B_7Cflag 0 (dread i64 %Reg0_J)
  #INSTIDX : 4||0004:  iconst_0
  dassign %Reg0_I 0 (constval i32 0)
  #INSTIDX : 5||0005:  putstatic
  dassign $LThreadTest_3B_7Cnumber 0 (dread i32 %Reg0_I)
  #INSTIDX : 8||0008:  return
  return ()
}
func &LThreadTest_24FirstThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24FirstThread_3B>>) void {
  funcid 48156
  var %Reg1_R43700 <* <$LThreadTest_24FirstThread_3B>>
  var %Reg1_R1610 <* <$Ljava_2Flang_2FThread_3B>>

  dassign %Reg1_R43700 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  dassign %Reg1_R1610 0 (retype ref <* <$Ljava_2Flang_2FThread_3B>> (dread ref %Reg1_R43700))
  callassigned &Ljava_2Flang_2FThread_3B_7C_3Cinit_3E_7C_28_29V (dread ref %Reg1_R1610) {}
  #INSTIDX : 4||0004:  return
  return ()
}
func &LThreadTest_24FirstThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24FirstThread_3B>>) void {
  funcid 48157
  var %Reg4_R43700 <* <$LThreadTest_24FirstThread_3B>>
  var %Reg0_J i64
  var %Reg1_J i64
  var %Reg0_I i32
  var %Reg0_R562 <* <$Ljava_2Fio_2FPrintStream_3B>>
  var %Reg1_I i32

  dassign %Reg4_R43700 0 (dread ref %_this)
@label2   #INSTIDX : 0||0000:  getstatic
  intrinsiccallwithtype <$LThreadTest_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_J 0 (dread i64 $LThreadTest_3B_7Cflag)
  #INSTIDX : 3||0003:  ldc2_w
  dassign %Reg1_J 0 (constval i64 0x7fffffffffffffff)
  #INSTIDX : 6||0006:  lcmp
  dassign %Reg0_I 0 (cmp i32 i64 (dread i64 %Reg0_J, dread i64 %Reg1_J))
  #INSTIDX : 7||0007:  ifeq
  brtrue @label3 (eq i32 i32 (dread i32 %Reg0_I, constval i32 0))
  #INSTIDX : 10||000a:  goto
  goto @label2
@label3   #INSTIDX : 13||000d:  getstatic
  intrinsiccallwithtype <$Ljava_2Flang_2FSystem_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg0_R562 0 (dread ref $Ljava_2Flang_2FSystem_3B_7Cout)
  #INSTIDX : 16||0010:  getstatic
  intrinsiccallwithtype <$LThreadTest_3B> JAVA_CLINIT_CHECK ()
  dassign %Reg1_I 0 (dread i32 $LThreadTest_3B_7Cnumber)
  #INSTIDX : 19||0013:  invokevirtual
  virtualcallassigned &Ljava_2Fio_2FPrintStream_3B_7Cprintln_7C_28I_29V (dread ref %Reg0_R562, dread i32 %Reg1_I) {}
  #INSTIDX : 22||0016:  return
  return ()
}
func &LThreadTest_24SecondThread_3B_7C_3Cinit_3E_7C_28_29V constructor (var %_this <* <$LThreadTest_24SecondThread_3B>>) void {
  funcid 48158
  var %Reg1_R43702 <* <$LThreadTest_24SecondThread_3B>>
  var %Reg1_R1610 <* <$Ljava_2Flang_2FThread_3B>>

  dassign %Reg1_R43702 0 (dread ref %_this)
  #INSTIDX : 0||0000:  aload_0
  #INSTIDX : 1||0001:  invokespecial
  dassign %Reg1_R1610 0 (retype ref <* <$Ljava_2Flang_2FThread_3B>> (dread ref %Reg1_R43702))
  callassigned &Ljava_2Flang_2FThread_3B_7C_3Cinit_3E_7C_28_29V (dread ref %Reg1_R1610) {}
  #INSTIDX : 4||0004:  return
  return ()
}
func &LThreadTest_24SecondThread_3B_7Crun_7C_28_29V public virtual (var %_this <* <$LThreadTest_24SecondThread_3B>>) void {
  funcid 48159
  var %Reg2_R43702 <* <$LThreadTest_24SecondThread_3B>>
  var %Reg0_I i32
  var %Reg0_J i64

  dassign %Reg2_R43702 0 (dread ref %_this)
  #INSTIDX : 0||0000:  bipush
  dassign %Reg0_I 0 (constval i32 42)
  #INSTIDX : 2||0002:  putstatic
  intrinsiccallwithtype <$LThreadTest_3B> JAVA_CLINIT_CHECK ()
  dassign $LThreadTest_3B_7Cnumber 0 (dread i32 %Reg0_I)
  #INSTIDX : 5||0005:  ldc2_w
  dassign %Reg0_J 0 (constval i64 0x7fffffffffffffff)
  #INSTIDX : 8||0008:  putstatic
  intrinsiccallwithtype <$LThreadTest_3B> JAVA_CLINIT_CHECK ()
  dassign $LThreadTest_3B_7Cflag 0 (dread i64 %Reg0_J)
  #INSTIDX : 11||000b:  return
  return ()
}


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: gga_exc *)
(* prefix:
  gga_x_hjs_params *params;

  assert(p->params != NULL);
  params = (gga_x_hjs_params * )(p->params);
*)

hjs_AA :=  0.757211:
hjs_BB := -0.106364:
hjs_CC := -0.118649:
hjs_DD :=  0.609650:

hjs_fH := s -> add(params_a_a[i]*s^(1+i), i=1..6)/(1 + add(params_a_b[i]*s^i, i=1..9)):

(* The m_max functions are necessary as in some cases the arguments of the
   sqrt become negative *)
hjs_zeta   := s -> m_max(s^2*hjs_fH(s), 1e-10):
hjs_eta    := s -> m_max(hjs_AA + hjs_zeta(s), 1e-10):
hjs_lambda := s -> hjs_DD + hjs_zeta(s):
hjs_chi    := (rs, z, s) -> nu(rs, z)/sqrt(hjs_lambda(s) + nu(rs, z)^2):

hjs_fF := (rs, z, s) ->
  1 - s^2/(27*hjs_CC*(1 + s^2/4)) - hjs_zeta(s)/(2*hjs_CC):

hjs_fG := (rs, z, s) ->
  - 2/5  * hjs_CC*hjs_fF(rs, z, s)*hjs_lambda(s)
  - 4/15 * hjs_BB*hjs_lambda(s)^2
  - 6/5  * hjs_AA*hjs_lambda(s)^3
  - hjs_lambda(s)^(7/2)*(4/5*sqrt(Pi) + 12/5*(sqrt(hjs_zeta(s)) - sqrt(hjs_eta(s)))):

hjs_f1 := (rs, z, s) ->
   + hjs_AA
   - 4/9 * hjs_BB*(1 - hjs_chi(rs, z, s))/hjs_lambda(s)
   - 2/9 * hjs_CC*hjs_fF(rs, z, s)*(2 - 3*hjs_chi(rs, z, s) + hjs_chi(rs, z, s)^3)/hjs_lambda(s)^2
   - 1/9 * hjs_fG(rs, z, s)*(8 - 15*hjs_chi(rs, z, s) + 10*hjs_chi(rs, z, s)^3 - 3*hjs_chi(rs, z, s)^5)/hjs_lambda(s)^3
   + 2*nu(rs, z)*(sqrt(hjs_zeta(s) + nu(rs, z)^2) -  sqrt(hjs_eta(s) + nu(rs, z)^2))
   + 2*hjs_zeta(s)*log((nu(rs, z) + sqrt(hjs_zeta(s) + nu(rs, z)^2))/(nu(rs, z) + sqrt(hjs_lambda(s) + nu(rs, z)^2)))
   - 2*hjs_eta(s)*log((nu(rs, z) + sqrt(hjs_eta(s) + nu(rs, z)^2))/(nu(rs, z) + sqrt(hjs_lambda(s) + nu(rs, z)^2))):

hjs_fx := (rs, z, x) -> hjs_f1(rs, z, X2S*x):

f := (rs, z, xt, xs0, xs1) -> gga_exchange_nsp(hjs_fx, rs, z, xs0, xs1):


text:
Q := [b*c+a, a*c-b, b*c-c^2+a-1, b*c+c^2+a+1, a*c-c^2-b-1, a*c+c^2-b+1, a*c-b*
c-a-b, a*c+b*c+a-b, a^2+b^2-3*c^2-3, a^2+b^2-c^2-1, 3*a^2+3*b^2-c^2-1, a^2+b^2
-b*c-a, a^2+b^2+b*c+a, a^2-a*c+b^2+b, a^2+a*c+b^2-b, a^2+b^2-4*b*c+c^2-4*a+1,
a^2+b^2-2*b*c-c^2-2*a-1, a^2+b^2+2*b*c-c^2+2*a-1, a^2+b^2+4*b*c+c^2+4*a+1, a^2
-4*a*c+b^2+c^2+4*b+1, a^2-2*a*c+b^2-c^2+2*b-1, a^2+2*a*c+b^2-c^2-2*b-1, a^2+4*
a*c+b^2+c^2-4*b+1, a^2-2*a*c+b^2-2*b*c+c^2-2*a+2*b+1, a^2-2*a*c+b^2+2*b*c+c^2+
2*a+2*b+1, a^2+2*a*c+b^2-2*b*c+c^2-2*a-2*b+1, a^2+2*a*c+b^2+2*b*c+c^2+2*a-2*b+
1, -b*c+a, a*b+c, -b^2-b*c+a-1, b^2-b*c+a+1, a*b-b*c+a+c, a*b+b*c-a+c, a*b-b^2
+c-1, a*b+b^2+c+1, a^2-b*c+c^2+a, a^2+b*c+c^2-a, a^2-3*b^2+c^2-3, a^2-b^2+c^2-\
1, 3*a^2-b^2+3*c^2-1, a^2-a*b+c^2-c, a^2+a*b+c^2+c, a^2-b^2-2*b*c+c^2+2*a-1, a
^2-b^2+2*b*c+c^2-2*a-1, a^2+b^2-4*b*c+c^2+4*a+1, a^2+b^2+4*b*c+c^2-4*a+1, a^2-\
4*a*b+b^2+c^2-4*c+1, a^2-2*a*b-b^2+c^2-2*c-1, a^2+2*a*b-b^2+c^2+2*c-1, a^2+4*a
*b+b^2+c^2+4*c+1, a^2-2*a*b+b^2-2*b*c+c^2+2*a-2*c+1, a^2-2*a*b+b^2+2*b*c+c^2-2
*a-2*c+1, a^2+2*a*b+b^2-2*b*c+c^2+2*a+2*c+1, a^2+2*a*b+b^2+2*b*c+c^2-2*a+2*c+1
, a*c+b, a*b-c, a*c-b^2-c^2+b, a*c+b^2+c^2+b, a*b-b^2-c^2-c, a*b+b^2+c^2-c, a*
b-a*c-b-c, a*b+a*c+b-c, a^2-3*b^2-3*c^2+1, a^2-b^2-c^2+1, 3*a^2-b^2-c^2+3, a^2
-a*c-b+1, a^2+a*c+b+1, a^2-a*b+c+1, a^2+a*b-c+1, a^2-4*a*c+b^2+c^2-4*b+1, a^2-\
2*a*c-b^2-c^2-2*b+1, a^2+2*a*c-b^2-c^2+2*b+1, a^2+4*a*c+b^2+c^2+4*b+1, a^2-4*a
*b+b^2+c^2+4*c+1, a^2-2*a*b-b^2-c^2+2*c+1, a^2+2*a*b-b^2-c^2-2*c+1, a^2+4*a*b+
b^2+c^2-4*c+1, a^2-2*a*b-2*a*c+b^2+c^2-2*b+2*c+1, a^2-2*a*b+2*a*c+b^2+c^2+2*b+
2*c+1, a^2+2*a*b-2*a*c+b^2+c^2-2*b-2*c+1, a^2+2*a*b+2*a*c+b^2+c^2+2*b-2*c+1];


text:
# 自定义生成包的工具。
# 基于LibraryTools。
# 增加了不存在包文件则直接创建文件的功能。
LibMaker:=module()
    option package;
    export MakeLib;

    (*
        将package保存到文件
        如果文件不存在则创建文件
        如果文件不含后缀名则补全后缀名
        默认文件名为 lib.mla
    *)
    MakeLib:=proc(mName,fName:="lib.mla")
        if not StringTools:-RegMatch(".*\\.mla",fName) then
            fName:=cat(fName,".mla");
        end if;
        if not FileTools:-Exists(fName) then
            LibraryTools:-Create(fName);
        end if;
        LibraryTools:-Save(mName,fNmae);
    end proc:
end module:


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: gga_exc *)

beefvdw_coeffs := [
   1.516501714e0,   4.413532099e-1, -9.182135241e-2, -2.352754331e-2,
   3.418828455e-2,  2.411870076e-3, -1.416381352e-2,  6.975895581e-4,
   9.859205137e-3, -6.737855051e-3, -1.573330824e-3,  5.036146253e-3,
  -2.569472453e-3, -9.874953976e-4,  2.033722895e-3, -8.018718848e-4,
  -6.688078723e-4,  1.030936331e-3, -3.673838660e-4, -4.213635394e-4,
   5.761607992e-4, -8.346503735e-5, -4.458447585e-4,  4.601290092e-4,
  -5.231775398e-6, -4.239570471e-4,  3.750190679e-4,  2.114938125e-5,
  -1.904911565e-4,  7.384362421e-5
]:

beefvdw_k  := 4:
beefvdw_xi := p -> 2*p/(beefvdw_k + p) - 1:

with(orthopoly):
beefvdw_f := x -> add(beefvdw_coeffs[i]*P(i-1, beefvdw_xi(X2S^2*x^2)), i=1..30):

f := (rs, zeta, xt, xs0, xs1) -> gga_exchange(beefvdw_f, rs, zeta, xs0, xs1):


text:
(*
 Copyright (C) 2017 M.A.L. Marques
               2020 Susi Lehtola

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* error function:
    Toulouse et al, Int. J. of Quant. Chem. 100, 1047 (2004); doi:10.1002/qua.20259
    Tawada et al, J. Chem. Phys. 120, 8425 (2004); doi:10.1063/1.1688752
*)
att_erf_aux1 := a -> sqrt(Pi)*erf(1/(2*a)):
att_erf_aux2 := a -> exp(-1/(4*a^2)) - 1:
att_erf_aux3 := a -> 2*a^2*att_erf_aux2(a) + 1/2:
(* This is the full function, which is numerically unstable for large a *)
attenuation_erf0 := a ->
  1 - 8/3*a*(att_erf_aux1(a) + 2*a*(att_erf_aux2(a) - att_erf_aux3(a))):
(* The cutoff and order are determined by check_attenuation.mpl *)
attenuation_erf := a -> enforce_smooth_lr(attenuation_erf0, a, 1.35, 16):

(* These are for hyb_mgga_x_js18 and hyb_mgga_x_pjs18. This is the
bracket in eqn (10) in Patra et al, 2018 *)
attenuation_erf_f20 := a ->
  1 + 24*a^2*( (20*a^2 - 64*a^4)*exp(-1/(4*a^2))
    - 3 - 36*a^2 + 64*a^4
    + 10*a*sqrt(Pi)*erf(1/(2*a))):
(* The cutoff and order are determined by check_attenuation.mpl *)
attenuation_erf_f2 := a -> enforce_smooth_lr(attenuation_erf_f20, a, 0.27, 46):

(* This is eqn (11) in Patra et al, 2018  *)
attenuation_erf_f30 := a ->
  1 + 8/7*a*(
        (-8*a + 256*a^3 - 576*a^5 + 3840*a^7 - 122880*a^9)*exp(-1/(4*a^2))
      + 24*a^3*(-35 + 224*a^2 - 1440*a^4 + 5120*a^6)
      + 2*sqrt(Pi)*(-2 + 60*a^2)*erf(1/(2*a))):
(* The cutoff and order are determined by check_attenuation.mpl *)
attenuation_erf_f3 := a -> enforce_smooth_lr(attenuation_erf_f30, a, 0.32, 38):

(* erf_gau - screening function = + 2 mu/sqrt(pi) exp(-mu^2 r^2)
    Song et al, J. Chem. Phys. 127, 154109 (2007); doi:10.1063/1.2790017
    You can recover the result in Int. J. of Quant. Chem. 100, 1047 (2004)
    by putting a = a/sqrt(3) and multiplying the whole attenuation function by -sqrt(3)
*)
attenuation_gau0 := a -> -8/3*a*(att_erf_aux1(a) + 2*a*att_erf_aux2(a)*(1 - 8*a^2) - 4*a):
(* The cutoff and order are determined by check_attenuation.mpl *)
attenuation_gau := a -> enforce_smooth_lr(attenuation_gau0, a, 2.07, 14):

(* yukawa
    Akinaga and Ten-no, Chem. Phys. Lett. 462, 348 (2008); doi:10.1016/j.cplett.2008.07.103
*)
att_yuk_aux1 := a -> arctan(1, a):
att_yuk_aux2 := a -> log(1 + 1/a^2):
att_yuk_aux3 := a -> a^2 + 1:
attenuation_yukawa0 := a -> 1 - 8/3*a*(att_yuk_aux1(a) + a/4*(1 - (att_yuk_aux3(a) + 2)*att_yuk_aux2(a))):
(* The cutoff and order are determined by check_attenuation.mpl *)
attenuation_yukawa := a -> enforce_smooth_lr(attenuation_yukawa0, a, 1.92, 36):


text:
(*
 Copyright (C) 2017 M.A.L. Marques

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
*)

(* type: mgga_exc *)

(* replace: "br89_x\(" -> "xc_mgga_x_br89_get_x(" *)

$include "mgga_x_br89.mpl"

mbrxh_a1 := 0.23432:
mbrxh_a2 := 0.089:
mbrxh_a3 := 0.0053:
params_a_at := 0:

(* new definition of Q. The rest of the functional remains the same *)
br89_Q := (x, u, t) ->
      mbrxh_a1*(2*t) - K_FACTOR_C + mbrxh_a2*x^2 + mbrxh_a3*x^4: