cranelift-codegen 0.79.0

Low-level code generator library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
;; GENERATED BY `gen_isle`. DO NOT EDIT!!!
;;
;; This ISLE file defines all the external type declarations for Cranelift's
;; data structures that ISLE will process, such as `InstructionData` and
;; `Opcode`.

;;;; Extern type declarations for immediates ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type Block (primitive Block))
(type Constant (primitive Constant))
(type FuncRef (primitive FuncRef))
(type GlobalValue (primitive GlobalValue))
(type Heap (primitive Heap))
(type Ieee32 (primitive Ieee32))
(type Ieee64 (primitive Ieee64))
(type Imm64 (primitive Imm64))
(type Immediate (primitive Immediate))
(type JumpTable (primitive JumpTable))
(type MemFlags (primitive MemFlags))
(type Offset32 (primitive Offset32))
(type SigRef (primitive SigRef))
(type StackSlot (primitive StackSlot))
(type Table (primitive Table))
(type Uimm32 (primitive Uimm32))
(type Uimm8 (primitive Uimm8))
(type bool (primitive bool))

;;;; Enumerated Immediate: AtomicRmwOp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type AtomicRmwOp extern
    (enum
        Add
        And
        Nand
        Or
        Smax
        Smin
        Sub
        Umax
        Umin
        Xchg
        Xor
    )
)

;;;; Enumerated Immediate: FloatCC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type FloatCC extern
    (enum
        Equal
        GreaterThan
        GreaterThanOrEqual
        LessThan
        LessThanOrEqual
        NotEqual
        Ordered
        OrderedNotEqual
        Unordered
        UnorderedOrEqual
        UnorderedOrGreaterThan
        UnorderedOrGreaterThanOrEqual
        UnorderedOrLessThan
        UnorderedOrLessThanOrEqual
    )
)

;;;; Enumerated Immediate: IntCC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type IntCC extern
    (enum
        Equal
        NotEqual
        NotOverflow
        Overflow
        SignedGreaterThan
        SignedGreaterThanOrEqual
        SignedLessThan
        SignedLessThanOrEqual
        UnsignedGreaterThan
        UnsignedGreaterThanOrEqual
        UnsignedLessThan
        UnsignedLessThanOrEqual
    )
)

;;;; Enumerated Immediate: TrapCode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type TrapCode extern
    (enum
        HeapOutOfBounds
        IntegerDivisionByZero
        IntegerOverflow
        StackOverflow
    )
)

;;;; Value Arrays ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; ISLE representation of `[Value; 2]`.
(type ValueArray2 extern (enum))

(decl value_array_2 (Value Value) ValueArray2)
(extern constructor value_array_2 pack_value_array_2)
(extern extractor infallible value_array_2 unpack_value_array_2)

;; ISLE representation of `[Value; 3]`.
(type ValueArray3 extern (enum))

(decl value_array_3 (Value Value Value) ValueArray3)
(extern constructor value_array_3 pack_value_array_3)
(extern extractor infallible value_array_3 unpack_value_array_3)

;;;; `Opcode` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type Opcode extern
    (enum
        Jump
        Brz
        Brnz
        BrIcmp
        Brif
        Brff
        BrTable
        Debugtrap
        Trap
        Trapz
        ResumableTrap
        Trapnz
        ResumableTrapnz
        Trapif
        Trapff
        Return
        FallthroughReturn
        Call
        CallIndirect
        FuncAddr
        Splat
        Swizzle
        Insertlane
        Extractlane
        Imin
        Umin
        Imax
        Umax
        AvgRound
        UaddSat
        SaddSat
        UsubSat
        SsubSat
        Load
        LoadComplex
        Store
        StoreComplex
        Uload8
        Uload8Complex
        Sload8
        Sload8Complex
        Istore8
        Istore8Complex
        Uload16
        Uload16Complex
        Sload16
        Sload16Complex
        Istore16
        Istore16Complex
        Uload32
        Uload32Complex
        Sload32
        Sload32Complex
        Istore32
        Istore32Complex
        Uload8x8
        Uload8x8Complex
        Sload8x8
        Sload8x8Complex
        Uload16x4
        Uload16x4Complex
        Sload16x4
        Sload16x4Complex
        Uload32x2
        Uload32x2Complex
        Sload32x2
        Sload32x2Complex
        StackLoad
        StackStore
        StackAddr
        GlobalValue
        SymbolValue
        TlsValue
        HeapAddr
        GetPinnedReg
        SetPinnedReg
        TableAddr
        Iconst
        F32const
        F64const
        Bconst
        Vconst
        ConstAddr
        Shuffle
        Null
        Nop
        Select
        Selectif
        SelectifSpectreGuard
        Bitselect
        Copy
        IfcmpSp
        Vsplit
        Vconcat
        Vselect
        VanyTrue
        VallTrue
        VhighBits
        Icmp
        IcmpImm
        Ifcmp
        IfcmpImm
        Iadd
        Isub
        Ineg
        Iabs
        Imul
        Umulhi
        Smulhi
        SqmulRoundSat
        Udiv
        Sdiv
        Urem
        Srem
        IaddImm
        ImulImm
        UdivImm
        SdivImm
        UremImm
        SremImm
        IrsubImm
        IaddCin
        IaddIfcin
        IaddCout
        IaddIfcout
        IaddCarry
        IaddIfcarry
        IsubBin
        IsubIfbin
        IsubBout
        IsubIfbout
        IsubBorrow
        IsubIfborrow
        Band
        Bor
        Bxor
        Bnot
        BandNot
        BorNot
        BxorNot
        BandImm
        BorImm
        BxorImm
        Rotl
        Rotr
        RotlImm
        RotrImm
        Ishl
        Ushr
        Sshr
        IshlImm
        UshrImm
        SshrImm
        Bitrev
        Clz
        Cls
        Ctz
        Popcnt
        Fcmp
        Ffcmp
        Fadd
        Fsub
        Fmul
        Fdiv
        Sqrt
        Fma
        Fneg
        Fabs
        Fcopysign
        Fmin
        FminPseudo
        Fmax
        FmaxPseudo
        Ceil
        Floor
        Trunc
        Nearest
        IsNull
        IsInvalid
        Trueif
        Trueff
        Bitcast
        RawBitcast
        ScalarToVector
        Breduce
        Bextend
        Bint
        Bmask
        Ireduce
        Snarrow
        Unarrow
        Uunarrow
        SwidenLow
        SwidenHigh
        UwidenLow
        UwidenHigh
        IaddPairwise
        WideningPairwiseDotProductS
        Uextend
        Sextend
        Fpromote
        Fdemote
        Fvdemote
        FvpromoteLow
        FcvtToUint
        FcvtToUintSat
        FcvtToSint
        FcvtToSintSat
        FcvtFromUint
        FcvtFromSint
        FcvtLowFromSint
        Isplit
        Iconcat
        AtomicRmw
        AtomicCas
        AtomicLoad
        AtomicStore
        Fence
    )
)

;;;; `InstructionData` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(type InstructionData extern
    (enum
        (AtomicCas (opcode Opcode) (args ValueArray3) (flags MemFlags))
        (AtomicRmw (opcode Opcode) (args ValueArray2) (flags MemFlags) (op AtomicRmwOp))
        (Binary (opcode Opcode) (args ValueArray2))
        (BinaryImm64 (opcode Opcode) (arg Value) (imm Imm64))
        (BinaryImm8 (opcode Opcode) (arg Value) (imm Uimm8))
        (Branch (opcode Opcode) (args ValueList) (destination Block))
        (BranchFloat (opcode Opcode) (args ValueList) (cond FloatCC) (destination Block))
        (BranchIcmp (opcode Opcode) (args ValueList) (cond IntCC) (destination Block))
        (BranchInt (opcode Opcode) (args ValueList) (cond IntCC) (destination Block))
        (BranchTable (opcode Opcode) (arg Value) (destination Block) (table JumpTable))
        (Call (opcode Opcode) (func_ref FuncRef))
        (CallIndirect (opcode Opcode) (args ValueList) (sig_ref SigRef))
        (CondTrap (opcode Opcode) (arg Value) (code TrapCode))
        (FloatCompare (opcode Opcode) (args ValueArray2) (cond FloatCC))
        (FloatCond (opcode Opcode) (arg Value) (cond FloatCC))
        (FloatCondTrap (opcode Opcode) (arg Value) (cond FloatCC) (code TrapCode))
        (FuncAddr (opcode Opcode) (func_ref FuncRef))
        (HeapAddr (opcode Opcode) (arg Value) (heap Heap) (imm Uimm32))
        (IntCompare (opcode Opcode) (args ValueArray2) (cond IntCC))
        (IntCompareImm (opcode Opcode) (arg Value) (cond IntCC) (imm Imm64))
        (IntCond (opcode Opcode) (arg Value) (cond IntCC))
        (IntCondTrap (opcode Opcode) (arg Value) (cond IntCC) (code TrapCode))
        (IntSelect (opcode Opcode) (args ValueArray3) (cond IntCC))
        (Jump (opcode Opcode) (destination Block))
        (Load (opcode Opcode) (arg Value) (flags MemFlags) (offset Offset32))
        (LoadComplex (opcode Opcode) (flags MemFlags) (offset Offset32))
        (LoadNoOffset (opcode Opcode) (arg Value) (flags MemFlags))
        (MultiAry (opcode Opcode))
        (NullAry (opcode Opcode))
        (Shuffle (opcode Opcode) (args ValueArray2) (imm Immediate))
        (StackLoad (opcode Opcode) (stack_slot StackSlot) (offset Offset32))
        (StackStore (opcode Opcode) (arg Value) (stack_slot StackSlot) (offset Offset32))
        (Store (opcode Opcode) (args ValueArray2) (flags MemFlags) (offset Offset32))
        (StoreComplex (opcode Opcode) (args ValueList) (flags MemFlags) (offset Offset32))
        (StoreNoOffset (opcode Opcode) (args ValueArray2) (flags MemFlags))
        (TableAddr (opcode Opcode) (arg Value) (table Table) (offset Offset32))
        (Ternary (opcode Opcode) (args ValueArray3))
        (TernaryImm8 (opcode Opcode) (args ValueArray2) (imm Uimm8))
        (Trap (opcode Opcode) (code TrapCode))
        (Unary (opcode Opcode) (arg Value))
        (UnaryBool (opcode Opcode) (imm bool))
        (UnaryConst (opcode Opcode) (constant_handle Constant))
        (UnaryGlobalValue (opcode Opcode) (global_value GlobalValue))
        (UnaryIeee32 (opcode Opcode) (imm Ieee32))
        (UnaryIeee64 (opcode Opcode) (imm Ieee64))
        (UnaryImm (opcode Opcode) (imm Imm64))
    )
)

;;;; Extracting Opcode, Operands, and Immediates from `InstructionData` ;;;;;;;;

(decl jump (Block ValueSlice) Inst)
(extractor
    (jump block args)
    (inst_data (InstructionData.Jump (Opcode.Jump) block))
)

(decl brz (Value Block ValueSlice) Inst)
(extractor
    (brz c block args)
    (inst_data (InstructionData.Branch (Opcode.Brz) (unwrap_head_value_list_1 c args) block))
)

(decl brnz (Value Block ValueSlice) Inst)
(extractor
    (brnz c block args)
    (inst_data (InstructionData.Branch (Opcode.Brnz) (unwrap_head_value_list_1 c args) block))
)

(decl br_icmp (IntCC Value Value Block ValueSlice) Inst)
(extractor
    (br_icmp Cond x y block args)
    (inst_data (InstructionData.BranchIcmp (Opcode.BrIcmp) (unwrap_head_value_list_2 x y args) Cond block))
)

(decl brif (IntCC Value Block ValueSlice) Inst)
(extractor
    (brif Cond f block args)
    (inst_data (InstructionData.BranchInt (Opcode.Brif) (unwrap_head_value_list_1 f args) Cond block))
)

(decl brff (FloatCC Value Block ValueSlice) Inst)
(extractor
    (brff Cond f block args)
    (inst_data (InstructionData.BranchFloat (Opcode.Brff) (unwrap_head_value_list_1 f args) Cond block))
)

(decl br_table (Value Block JumpTable) Inst)
(extractor
    (br_table x block JT)
    (inst_data (InstructionData.BranchTable (Opcode.BrTable) x block JT))
)

(decl debugtrap () Inst)
(extractor
    (debugtrap )
    (inst_data (InstructionData.NullAry (Opcode.Debugtrap)))
)

(decl trap (TrapCode) Inst)
(extractor
    (trap code)
    (inst_data (InstructionData.Trap (Opcode.Trap) code))
)

(decl trapz (Value TrapCode) Inst)
(extractor
    (trapz c code)
    (inst_data (InstructionData.CondTrap (Opcode.Trapz) c code))
)

(decl resumable_trap (TrapCode) Inst)
(extractor
    (resumable_trap code)
    (inst_data (InstructionData.Trap (Opcode.ResumableTrap) code))
)

(decl trapnz (Value TrapCode) Inst)
(extractor
    (trapnz c code)
    (inst_data (InstructionData.CondTrap (Opcode.Trapnz) c code))
)

(decl resumable_trapnz (Value TrapCode) Inst)
(extractor
    (resumable_trapnz c code)
    (inst_data (InstructionData.CondTrap (Opcode.ResumableTrapnz) c code))
)

(decl trapif (IntCC Value TrapCode) Inst)
(extractor
    (trapif Cond f code)
    (inst_data (InstructionData.IntCondTrap (Opcode.Trapif) f Cond code))
)

(decl trapff (FloatCC Value TrapCode) Inst)
(extractor
    (trapff Cond f code)
    (inst_data (InstructionData.FloatCondTrap (Opcode.Trapff) f Cond code))
)

(decl return (ValueSlice) Inst)
(extractor
    (return rvals)
    (inst_data (InstructionData.MultiAry (Opcode.Return)))
)

(decl fallthrough_return (ValueSlice) Inst)
(extractor
    (fallthrough_return rvals)
    (inst_data (InstructionData.MultiAry (Opcode.FallthroughReturn)))
)

(decl call (FuncRef ValueSlice) Inst)
(extractor
    (call FN args)
    (inst_data (InstructionData.Call (Opcode.Call) FN))
)

(decl call_indirect (SigRef Value ValueSlice) Inst)
(extractor
    (call_indirect SIG callee args)
    (inst_data (InstructionData.CallIndirect (Opcode.CallIndirect) (unwrap_head_value_list_1 callee args) SIG))
)

(decl func_addr (FuncRef) Inst)
(extractor
    (func_addr FN)
    (inst_data (InstructionData.FuncAddr (Opcode.FuncAddr) FN))
)

(decl splat (Value) Inst)
(extractor
    (splat x)
    (inst_data (InstructionData.Unary (Opcode.Splat) x))
)

(decl swizzle (Value Value) Inst)
(extractor
    (swizzle x y)
    (inst_data (InstructionData.Binary (Opcode.Swizzle) (value_array_2 x y)))
)

(decl insertlane (Value Value Uimm8) Inst)
(extractor
    (insertlane x y Idx)
    (inst_data (InstructionData.TernaryImm8 (Opcode.Insertlane) (value_array_2 x y) Idx))
)

(decl extractlane (Value Uimm8) Inst)
(extractor
    (extractlane x Idx)
    (inst_data (InstructionData.BinaryImm8 (Opcode.Extractlane) x Idx))
)

(decl imin (Value Value) Inst)
(extractor
    (imin x y)
    (inst_data (InstructionData.Binary (Opcode.Imin) (value_array_2 x y)))
)

(decl umin (Value Value) Inst)
(extractor
    (umin x y)
    (inst_data (InstructionData.Binary (Opcode.Umin) (value_array_2 x y)))
)

(decl imax (Value Value) Inst)
(extractor
    (imax x y)
    (inst_data (InstructionData.Binary (Opcode.Imax) (value_array_2 x y)))
)

(decl umax (Value Value) Inst)
(extractor
    (umax x y)
    (inst_data (InstructionData.Binary (Opcode.Umax) (value_array_2 x y)))
)

(decl avg_round (Value Value) Inst)
(extractor
    (avg_round x y)
    (inst_data (InstructionData.Binary (Opcode.AvgRound) (value_array_2 x y)))
)

(decl uadd_sat (Value Value) Inst)
(extractor
    (uadd_sat x y)
    (inst_data (InstructionData.Binary (Opcode.UaddSat) (value_array_2 x y)))
)

(decl sadd_sat (Value Value) Inst)
(extractor
    (sadd_sat x y)
    (inst_data (InstructionData.Binary (Opcode.SaddSat) (value_array_2 x y)))
)

(decl usub_sat (Value Value) Inst)
(extractor
    (usub_sat x y)
    (inst_data (InstructionData.Binary (Opcode.UsubSat) (value_array_2 x y)))
)

(decl ssub_sat (Value Value) Inst)
(extractor
    (ssub_sat x y)
    (inst_data (InstructionData.Binary (Opcode.SsubSat) (value_array_2 x y)))
)

(decl load (MemFlags Value Offset32) Inst)
(extractor
    (load MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Load) p MemFlags Offset))
)

(decl load_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (load_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.LoadComplex) MemFlags Offset))
)

(decl store (MemFlags Value Value Offset32) Inst)
(extractor
    (store MemFlags x p Offset)
    (inst_data (InstructionData.Store (Opcode.Store) (value_array_2 x p) MemFlags Offset))
)

(decl store_complex (MemFlags Value ValueSlice Offset32) Inst)
(extractor
    (store_complex MemFlags x args Offset)
    (inst_data (InstructionData.StoreComplex (Opcode.StoreComplex) (unwrap_head_value_list_1 x args) MemFlags Offset))
)

(decl uload8 (MemFlags Value Offset32) Inst)
(extractor
    (uload8 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload8) p MemFlags Offset))
)

(decl uload8_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload8_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload8Complex) MemFlags Offset))
)

(decl sload8 (MemFlags Value Offset32) Inst)
(extractor
    (sload8 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload8) p MemFlags Offset))
)

(decl sload8_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload8_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload8Complex) MemFlags Offset))
)

(decl istore8 (MemFlags Value Value Offset32) Inst)
(extractor
    (istore8 MemFlags x p Offset)
    (inst_data (InstructionData.Store (Opcode.Istore8) (value_array_2 x p) MemFlags Offset))
)

(decl istore8_complex (MemFlags Value ValueSlice Offset32) Inst)
(extractor
    (istore8_complex MemFlags x args Offset)
    (inst_data (InstructionData.StoreComplex (Opcode.Istore8Complex) (unwrap_head_value_list_1 x args) MemFlags Offset))
)

(decl uload16 (MemFlags Value Offset32) Inst)
(extractor
    (uload16 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload16) p MemFlags Offset))
)

(decl uload16_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload16_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload16Complex) MemFlags Offset))
)

(decl sload16 (MemFlags Value Offset32) Inst)
(extractor
    (sload16 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload16) p MemFlags Offset))
)

(decl sload16_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload16_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload16Complex) MemFlags Offset))
)

(decl istore16 (MemFlags Value Value Offset32) Inst)
(extractor
    (istore16 MemFlags x p Offset)
    (inst_data (InstructionData.Store (Opcode.Istore16) (value_array_2 x p) MemFlags Offset))
)

(decl istore16_complex (MemFlags Value ValueSlice Offset32) Inst)
(extractor
    (istore16_complex MemFlags x args Offset)
    (inst_data (InstructionData.StoreComplex (Opcode.Istore16Complex) (unwrap_head_value_list_1 x args) MemFlags Offset))
)

(decl uload32 (MemFlags Value Offset32) Inst)
(extractor
    (uload32 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload32) p MemFlags Offset))
)

(decl uload32_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload32_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload32Complex) MemFlags Offset))
)

(decl sload32 (MemFlags Value Offset32) Inst)
(extractor
    (sload32 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload32) p MemFlags Offset))
)

(decl sload32_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload32_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload32Complex) MemFlags Offset))
)

(decl istore32 (MemFlags Value Value Offset32) Inst)
(extractor
    (istore32 MemFlags x p Offset)
    (inst_data (InstructionData.Store (Opcode.Istore32) (value_array_2 x p) MemFlags Offset))
)

(decl istore32_complex (MemFlags Value ValueSlice Offset32) Inst)
(extractor
    (istore32_complex MemFlags x args Offset)
    (inst_data (InstructionData.StoreComplex (Opcode.Istore32Complex) (unwrap_head_value_list_1 x args) MemFlags Offset))
)

(decl uload8x8 (MemFlags Value Offset32) Inst)
(extractor
    (uload8x8 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload8x8) p MemFlags Offset))
)

(decl uload8x8_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload8x8_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload8x8Complex) MemFlags Offset))
)

(decl sload8x8 (MemFlags Value Offset32) Inst)
(extractor
    (sload8x8 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload8x8) p MemFlags Offset))
)

(decl sload8x8_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload8x8_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload8x8Complex) MemFlags Offset))
)

(decl uload16x4 (MemFlags Value Offset32) Inst)
(extractor
    (uload16x4 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload16x4) p MemFlags Offset))
)

(decl uload16x4_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload16x4_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload16x4Complex) MemFlags Offset))
)

(decl sload16x4 (MemFlags Value Offset32) Inst)
(extractor
    (sload16x4 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload16x4) p MemFlags Offset))
)

(decl sload16x4_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload16x4_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload16x4Complex) MemFlags Offset))
)

(decl uload32x2 (MemFlags Value Offset32) Inst)
(extractor
    (uload32x2 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Uload32x2) p MemFlags Offset))
)

(decl uload32x2_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (uload32x2_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Uload32x2Complex) MemFlags Offset))
)

(decl sload32x2 (MemFlags Value Offset32) Inst)
(extractor
    (sload32x2 MemFlags p Offset)
    (inst_data (InstructionData.Load (Opcode.Sload32x2) p MemFlags Offset))
)

(decl sload32x2_complex (MemFlags ValueSlice Offset32) Inst)
(extractor
    (sload32x2_complex MemFlags args Offset)
    (inst_data (InstructionData.LoadComplex (Opcode.Sload32x2Complex) MemFlags Offset))
)

(decl stack_load (StackSlot Offset32) Inst)
(extractor
    (stack_load SS Offset)
    (inst_data (InstructionData.StackLoad (Opcode.StackLoad) SS Offset))
)

(decl stack_store (Value StackSlot Offset32) Inst)
(extractor
    (stack_store x SS Offset)
    (inst_data (InstructionData.StackStore (Opcode.StackStore) x SS Offset))
)

(decl stack_addr (StackSlot Offset32) Inst)
(extractor
    (stack_addr SS Offset)
    (inst_data (InstructionData.StackLoad (Opcode.StackAddr) SS Offset))
)

(decl global_value (GlobalValue) Inst)
(extractor
    (global_value GV)
    (inst_data (InstructionData.UnaryGlobalValue (Opcode.GlobalValue) GV))
)

(decl symbol_value (GlobalValue) Inst)
(extractor
    (symbol_value GV)
    (inst_data (InstructionData.UnaryGlobalValue (Opcode.SymbolValue) GV))
)

(decl tls_value (GlobalValue) Inst)
(extractor
    (tls_value GV)
    (inst_data (InstructionData.UnaryGlobalValue (Opcode.TlsValue) GV))
)

(decl heap_addr (Heap Value Uimm32) Inst)
(extractor
    (heap_addr H p Size)
    (inst_data (InstructionData.HeapAddr (Opcode.HeapAddr) p H Size))
)

(decl get_pinned_reg () Inst)
(extractor
    (get_pinned_reg )
    (inst_data (InstructionData.NullAry (Opcode.GetPinnedReg)))
)

(decl set_pinned_reg (Value) Inst)
(extractor
    (set_pinned_reg addr)
    (inst_data (InstructionData.Unary (Opcode.SetPinnedReg) addr))
)

(decl table_addr (Table Value Offset32) Inst)
(extractor
    (table_addr T p Offset)
    (inst_data (InstructionData.TableAddr (Opcode.TableAddr) p T Offset))
)

(decl iconst (Imm64) Inst)
(extractor
    (iconst N)
    (inst_data (InstructionData.UnaryImm (Opcode.Iconst) N))
)

(decl f32const (Ieee32) Inst)
(extractor
    (f32const N)
    (inst_data (InstructionData.UnaryIeee32 (Opcode.F32const) N))
)

(decl f64const (Ieee64) Inst)
(extractor
    (f64const N)
    (inst_data (InstructionData.UnaryIeee64 (Opcode.F64const) N))
)

(decl bconst (bool) Inst)
(extractor
    (bconst N)
    (inst_data (InstructionData.UnaryBool (Opcode.Bconst) N))
)

(decl vconst (Constant) Inst)
(extractor
    (vconst N)
    (inst_data (InstructionData.UnaryConst (Opcode.Vconst) N))
)

(decl const_addr (Constant) Inst)
(extractor
    (const_addr constant)
    (inst_data (InstructionData.UnaryConst (Opcode.ConstAddr) constant))
)

(decl shuffle (Value Value Immediate) Inst)
(extractor
    (shuffle a b mask)
    (inst_data (InstructionData.Shuffle (Opcode.Shuffle) (value_array_2 a b) mask))
)

(decl null () Inst)
(extractor
    (null )
    (inst_data (InstructionData.NullAry (Opcode.Null)))
)

(decl nop () Inst)
(extractor
    (nop )
    (inst_data (InstructionData.NullAry (Opcode.Nop)))
)

(decl select (Value Value Value) Inst)
(extractor
    (select c x y)
    (inst_data (InstructionData.Ternary (Opcode.Select) (value_array_3 c x y)))
)

(decl selectif (IntCC Value Value Value) Inst)
(extractor
    (selectif cc flags x y)
    (inst_data (InstructionData.IntSelect (Opcode.Selectif) (value_array_3 flags x y) cc))
)

(decl selectif_spectre_guard (IntCC Value Value Value) Inst)
(extractor
    (selectif_spectre_guard cc flags x y)
    (inst_data (InstructionData.IntSelect (Opcode.SelectifSpectreGuard) (value_array_3 flags x y) cc))
)

(decl bitselect (Value Value Value) Inst)
(extractor
    (bitselect c x y)
    (inst_data (InstructionData.Ternary (Opcode.Bitselect) (value_array_3 c x y)))
)

(decl copy (Value) Inst)
(extractor
    (copy x)
    (inst_data (InstructionData.Unary (Opcode.Copy) x))
)

(decl ifcmp_sp (Value) Inst)
(extractor
    (ifcmp_sp addr)
    (inst_data (InstructionData.Unary (Opcode.IfcmpSp) addr))
)

(decl vsplit (Value) Inst)
(extractor
    (vsplit x)
    (inst_data (InstructionData.Unary (Opcode.Vsplit) x))
)

(decl vconcat (Value Value) Inst)
(extractor
    (vconcat x y)
    (inst_data (InstructionData.Binary (Opcode.Vconcat) (value_array_2 x y)))
)

(decl vselect (Value Value Value) Inst)
(extractor
    (vselect c x y)
    (inst_data (InstructionData.Ternary (Opcode.Vselect) (value_array_3 c x y)))
)

(decl vany_true (Value) Inst)
(extractor
    (vany_true a)
    (inst_data (InstructionData.Unary (Opcode.VanyTrue) a))
)

(decl vall_true (Value) Inst)
(extractor
    (vall_true a)
    (inst_data (InstructionData.Unary (Opcode.VallTrue) a))
)

(decl vhigh_bits (Value) Inst)
(extractor
    (vhigh_bits a)
    (inst_data (InstructionData.Unary (Opcode.VhighBits) a))
)

(decl icmp (IntCC Value Value) Inst)
(extractor
    (icmp Cond x y)
    (inst_data (InstructionData.IntCompare (Opcode.Icmp) (value_array_2 x y) Cond))
)

(decl icmp_imm (IntCC Value Imm64) Inst)
(extractor
    (icmp_imm Cond x Y)
    (inst_data (InstructionData.IntCompareImm (Opcode.IcmpImm) x Cond Y))
)

(decl ifcmp (Value Value) Inst)
(extractor
    (ifcmp x y)
    (inst_data (InstructionData.Binary (Opcode.Ifcmp) (value_array_2 x y)))
)

(decl ifcmp_imm (Value Imm64) Inst)
(extractor
    (ifcmp_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.IfcmpImm) x Y))
)

(decl iadd (Value Value) Inst)
(extractor
    (iadd x y)
    (inst_data (InstructionData.Binary (Opcode.Iadd) (value_array_2 x y)))
)

(decl isub (Value Value) Inst)
(extractor
    (isub x y)
    (inst_data (InstructionData.Binary (Opcode.Isub) (value_array_2 x y)))
)

(decl ineg (Value) Inst)
(extractor
    (ineg x)
    (inst_data (InstructionData.Unary (Opcode.Ineg) x))
)

(decl iabs (Value) Inst)
(extractor
    (iabs x)
    (inst_data (InstructionData.Unary (Opcode.Iabs) x))
)

(decl imul (Value Value) Inst)
(extractor
    (imul x y)
    (inst_data (InstructionData.Binary (Opcode.Imul) (value_array_2 x y)))
)

(decl umulhi (Value Value) Inst)
(extractor
    (umulhi x y)
    (inst_data (InstructionData.Binary (Opcode.Umulhi) (value_array_2 x y)))
)

(decl smulhi (Value Value) Inst)
(extractor
    (smulhi x y)
    (inst_data (InstructionData.Binary (Opcode.Smulhi) (value_array_2 x y)))
)

(decl sqmul_round_sat (Value Value) Inst)
(extractor
    (sqmul_round_sat x y)
    (inst_data (InstructionData.Binary (Opcode.SqmulRoundSat) (value_array_2 x y)))
)

(decl udiv (Value Value) Inst)
(extractor
    (udiv x y)
    (inst_data (InstructionData.Binary (Opcode.Udiv) (value_array_2 x y)))
)

(decl sdiv (Value Value) Inst)
(extractor
    (sdiv x y)
    (inst_data (InstructionData.Binary (Opcode.Sdiv) (value_array_2 x y)))
)

(decl urem (Value Value) Inst)
(extractor
    (urem x y)
    (inst_data (InstructionData.Binary (Opcode.Urem) (value_array_2 x y)))
)

(decl srem (Value Value) Inst)
(extractor
    (srem x y)
    (inst_data (InstructionData.Binary (Opcode.Srem) (value_array_2 x y)))
)

(decl iadd_imm (Value Imm64) Inst)
(extractor
    (iadd_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.IaddImm) x Y))
)

(decl imul_imm (Value Imm64) Inst)
(extractor
    (imul_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.ImulImm) x Y))
)

(decl udiv_imm (Value Imm64) Inst)
(extractor
    (udiv_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.UdivImm) x Y))
)

(decl sdiv_imm (Value Imm64) Inst)
(extractor
    (sdiv_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.SdivImm) x Y))
)

(decl urem_imm (Value Imm64) Inst)
(extractor
    (urem_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.UremImm) x Y))
)

(decl srem_imm (Value Imm64) Inst)
(extractor
    (srem_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.SremImm) x Y))
)

(decl irsub_imm (Value Imm64) Inst)
(extractor
    (irsub_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.IrsubImm) x Y))
)

(decl iadd_cin (Value Value Value) Inst)
(extractor
    (iadd_cin x y c_in)
    (inst_data (InstructionData.Ternary (Opcode.IaddCin) (value_array_3 x y c_in)))
)

(decl iadd_ifcin (Value Value Value) Inst)
(extractor
    (iadd_ifcin x y c_in)
    (inst_data (InstructionData.Ternary (Opcode.IaddIfcin) (value_array_3 x y c_in)))
)

(decl iadd_cout (Value Value) Inst)
(extractor
    (iadd_cout x y)
    (inst_data (InstructionData.Binary (Opcode.IaddCout) (value_array_2 x y)))
)

(decl iadd_ifcout (Value Value) Inst)
(extractor
    (iadd_ifcout x y)
    (inst_data (InstructionData.Binary (Opcode.IaddIfcout) (value_array_2 x y)))
)

(decl iadd_carry (Value Value Value) Inst)
(extractor
    (iadd_carry x y c_in)
    (inst_data (InstructionData.Ternary (Opcode.IaddCarry) (value_array_3 x y c_in)))
)

(decl iadd_ifcarry (Value Value Value) Inst)
(extractor
    (iadd_ifcarry x y c_in)
    (inst_data (InstructionData.Ternary (Opcode.IaddIfcarry) (value_array_3 x y c_in)))
)

(decl isub_bin (Value Value Value) Inst)
(extractor
    (isub_bin x y b_in)
    (inst_data (InstructionData.Ternary (Opcode.IsubBin) (value_array_3 x y b_in)))
)

(decl isub_ifbin (Value Value Value) Inst)
(extractor
    (isub_ifbin x y b_in)
    (inst_data (InstructionData.Ternary (Opcode.IsubIfbin) (value_array_3 x y b_in)))
)

(decl isub_bout (Value Value) Inst)
(extractor
    (isub_bout x y)
    (inst_data (InstructionData.Binary (Opcode.IsubBout) (value_array_2 x y)))
)

(decl isub_ifbout (Value Value) Inst)
(extractor
    (isub_ifbout x y)
    (inst_data (InstructionData.Binary (Opcode.IsubIfbout) (value_array_2 x y)))
)

(decl isub_borrow (Value Value Value) Inst)
(extractor
    (isub_borrow x y b_in)
    (inst_data (InstructionData.Ternary (Opcode.IsubBorrow) (value_array_3 x y b_in)))
)

(decl isub_ifborrow (Value Value Value) Inst)
(extractor
    (isub_ifborrow x y b_in)
    (inst_data (InstructionData.Ternary (Opcode.IsubIfborrow) (value_array_3 x y b_in)))
)

(decl band (Value Value) Inst)
(extractor
    (band x y)
    (inst_data (InstructionData.Binary (Opcode.Band) (value_array_2 x y)))
)

(decl bor (Value Value) Inst)
(extractor
    (bor x y)
    (inst_data (InstructionData.Binary (Opcode.Bor) (value_array_2 x y)))
)

(decl bxor (Value Value) Inst)
(extractor
    (bxor x y)
    (inst_data (InstructionData.Binary (Opcode.Bxor) (value_array_2 x y)))
)

(decl bnot (Value) Inst)
(extractor
    (bnot x)
    (inst_data (InstructionData.Unary (Opcode.Bnot) x))
)

(decl band_not (Value Value) Inst)
(extractor
    (band_not x y)
    (inst_data (InstructionData.Binary (Opcode.BandNot) (value_array_2 x y)))
)

(decl bor_not (Value Value) Inst)
(extractor
    (bor_not x y)
    (inst_data (InstructionData.Binary (Opcode.BorNot) (value_array_2 x y)))
)

(decl bxor_not (Value Value) Inst)
(extractor
    (bxor_not x y)
    (inst_data (InstructionData.Binary (Opcode.BxorNot) (value_array_2 x y)))
)

(decl band_imm (Value Imm64) Inst)
(extractor
    (band_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.BandImm) x Y))
)

(decl bor_imm (Value Imm64) Inst)
(extractor
    (bor_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.BorImm) x Y))
)

(decl bxor_imm (Value Imm64) Inst)
(extractor
    (bxor_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.BxorImm) x Y))
)

(decl rotl (Value Value) Inst)
(extractor
    (rotl x y)
    (inst_data (InstructionData.Binary (Opcode.Rotl) (value_array_2 x y)))
)

(decl rotr (Value Value) Inst)
(extractor
    (rotr x y)
    (inst_data (InstructionData.Binary (Opcode.Rotr) (value_array_2 x y)))
)

(decl rotl_imm (Value Imm64) Inst)
(extractor
    (rotl_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.RotlImm) x Y))
)

(decl rotr_imm (Value Imm64) Inst)
(extractor
    (rotr_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.RotrImm) x Y))
)

(decl ishl (Value Value) Inst)
(extractor
    (ishl x y)
    (inst_data (InstructionData.Binary (Opcode.Ishl) (value_array_2 x y)))
)

(decl ushr (Value Value) Inst)
(extractor
    (ushr x y)
    (inst_data (InstructionData.Binary (Opcode.Ushr) (value_array_2 x y)))
)

(decl sshr (Value Value) Inst)
(extractor
    (sshr x y)
    (inst_data (InstructionData.Binary (Opcode.Sshr) (value_array_2 x y)))
)

(decl ishl_imm (Value Imm64) Inst)
(extractor
    (ishl_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.IshlImm) x Y))
)

(decl ushr_imm (Value Imm64) Inst)
(extractor
    (ushr_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.UshrImm) x Y))
)

(decl sshr_imm (Value Imm64) Inst)
(extractor
    (sshr_imm x Y)
    (inst_data (InstructionData.BinaryImm64 (Opcode.SshrImm) x Y))
)

(decl bitrev (Value) Inst)
(extractor
    (bitrev x)
    (inst_data (InstructionData.Unary (Opcode.Bitrev) x))
)

(decl clz (Value) Inst)
(extractor
    (clz x)
    (inst_data (InstructionData.Unary (Opcode.Clz) x))
)

(decl cls (Value) Inst)
(extractor
    (cls x)
    (inst_data (InstructionData.Unary (Opcode.Cls) x))
)

(decl ctz (Value) Inst)
(extractor
    (ctz x)
    (inst_data (InstructionData.Unary (Opcode.Ctz) x))
)

(decl popcnt (Value) Inst)
(extractor
    (popcnt x)
    (inst_data (InstructionData.Unary (Opcode.Popcnt) x))
)

(decl fcmp (FloatCC Value Value) Inst)
(extractor
    (fcmp Cond x y)
    (inst_data (InstructionData.FloatCompare (Opcode.Fcmp) (value_array_2 x y) Cond))
)

(decl ffcmp (Value Value) Inst)
(extractor
    (ffcmp x y)
    (inst_data (InstructionData.Binary (Opcode.Ffcmp) (value_array_2 x y)))
)

(decl fadd (Value Value) Inst)
(extractor
    (fadd x y)
    (inst_data (InstructionData.Binary (Opcode.Fadd) (value_array_2 x y)))
)

(decl fsub (Value Value) Inst)
(extractor
    (fsub x y)
    (inst_data (InstructionData.Binary (Opcode.Fsub) (value_array_2 x y)))
)

(decl fmul (Value Value) Inst)
(extractor
    (fmul x y)
    (inst_data (InstructionData.Binary (Opcode.Fmul) (value_array_2 x y)))
)

(decl fdiv (Value Value) Inst)
(extractor
    (fdiv x y)
    (inst_data (InstructionData.Binary (Opcode.Fdiv) (value_array_2 x y)))
)

(decl sqrt (Value) Inst)
(extractor
    (sqrt x)
    (inst_data (InstructionData.Unary (Opcode.Sqrt) x))
)

(decl fma (Value Value Value) Inst)
(extractor
    (fma x y z)
    (inst_data (InstructionData.Ternary (Opcode.Fma) (value_array_3 x y z)))
)

(decl fneg (Value) Inst)
(extractor
    (fneg x)
    (inst_data (InstructionData.Unary (Opcode.Fneg) x))
)

(decl fabs (Value) Inst)
(extractor
    (fabs x)
    (inst_data (InstructionData.Unary (Opcode.Fabs) x))
)

(decl fcopysign (Value Value) Inst)
(extractor
    (fcopysign x y)
    (inst_data (InstructionData.Binary (Opcode.Fcopysign) (value_array_2 x y)))
)

(decl fmin (Value Value) Inst)
(extractor
    (fmin x y)
    (inst_data (InstructionData.Binary (Opcode.Fmin) (value_array_2 x y)))
)

(decl fmin_pseudo (Value Value) Inst)
(extractor
    (fmin_pseudo x y)
    (inst_data (InstructionData.Binary (Opcode.FminPseudo) (value_array_2 x y)))
)

(decl fmax (Value Value) Inst)
(extractor
    (fmax x y)
    (inst_data (InstructionData.Binary (Opcode.Fmax) (value_array_2 x y)))
)

(decl fmax_pseudo (Value Value) Inst)
(extractor
    (fmax_pseudo x y)
    (inst_data (InstructionData.Binary (Opcode.FmaxPseudo) (value_array_2 x y)))
)

(decl ceil (Value) Inst)
(extractor
    (ceil x)
    (inst_data (InstructionData.Unary (Opcode.Ceil) x))
)

(decl floor (Value) Inst)
(extractor
    (floor x)
    (inst_data (InstructionData.Unary (Opcode.Floor) x))
)

(decl trunc (Value) Inst)
(extractor
    (trunc x)
    (inst_data (InstructionData.Unary (Opcode.Trunc) x))
)

(decl nearest (Value) Inst)
(extractor
    (nearest x)
    (inst_data (InstructionData.Unary (Opcode.Nearest) x))
)

(decl is_null (Value) Inst)
(extractor
    (is_null x)
    (inst_data (InstructionData.Unary (Opcode.IsNull) x))
)

(decl is_invalid (Value) Inst)
(extractor
    (is_invalid x)
    (inst_data (InstructionData.Unary (Opcode.IsInvalid) x))
)

(decl trueif (IntCC Value) Inst)
(extractor
    (trueif Cond f)
    (inst_data (InstructionData.IntCond (Opcode.Trueif) f Cond))
)

(decl trueff (FloatCC Value) Inst)
(extractor
    (trueff Cond f)
    (inst_data (InstructionData.FloatCond (Opcode.Trueff) f Cond))
)

(decl bitcast (Value) Inst)
(extractor
    (bitcast x)
    (inst_data (InstructionData.Unary (Opcode.Bitcast) x))
)

(decl raw_bitcast (Value) Inst)
(extractor
    (raw_bitcast x)
    (inst_data (InstructionData.Unary (Opcode.RawBitcast) x))
)

(decl scalar_to_vector (Value) Inst)
(extractor
    (scalar_to_vector s)
    (inst_data (InstructionData.Unary (Opcode.ScalarToVector) s))
)

(decl breduce (Value) Inst)
(extractor
    (breduce x)
    (inst_data (InstructionData.Unary (Opcode.Breduce) x))
)

(decl bextend (Value) Inst)
(extractor
    (bextend x)
    (inst_data (InstructionData.Unary (Opcode.Bextend) x))
)

(decl bint (Value) Inst)
(extractor
    (bint x)
    (inst_data (InstructionData.Unary (Opcode.Bint) x))
)

(decl bmask (Value) Inst)
(extractor
    (bmask x)
    (inst_data (InstructionData.Unary (Opcode.Bmask) x))
)

(decl ireduce (Value) Inst)
(extractor
    (ireduce x)
    (inst_data (InstructionData.Unary (Opcode.Ireduce) x))
)

(decl snarrow (Value Value) Inst)
(extractor
    (snarrow x y)
    (inst_data (InstructionData.Binary (Opcode.Snarrow) (value_array_2 x y)))
)

(decl unarrow (Value Value) Inst)
(extractor
    (unarrow x y)
    (inst_data (InstructionData.Binary (Opcode.Unarrow) (value_array_2 x y)))
)

(decl uunarrow (Value Value) Inst)
(extractor
    (uunarrow x y)
    (inst_data (InstructionData.Binary (Opcode.Uunarrow) (value_array_2 x y)))
)

(decl swiden_low (Value) Inst)
(extractor
    (swiden_low x)
    (inst_data (InstructionData.Unary (Opcode.SwidenLow) x))
)

(decl swiden_high (Value) Inst)
(extractor
    (swiden_high x)
    (inst_data (InstructionData.Unary (Opcode.SwidenHigh) x))
)

(decl uwiden_low (Value) Inst)
(extractor
    (uwiden_low x)
    (inst_data (InstructionData.Unary (Opcode.UwidenLow) x))
)

(decl uwiden_high (Value) Inst)
(extractor
    (uwiden_high x)
    (inst_data (InstructionData.Unary (Opcode.UwidenHigh) x))
)

(decl iadd_pairwise (Value Value) Inst)
(extractor
    (iadd_pairwise x y)
    (inst_data (InstructionData.Binary (Opcode.IaddPairwise) (value_array_2 x y)))
)

(decl widening_pairwise_dot_product_s (Value Value) Inst)
(extractor
    (widening_pairwise_dot_product_s x y)
    (inst_data (InstructionData.Binary (Opcode.WideningPairwiseDotProductS) (value_array_2 x y)))
)

(decl uextend (Value) Inst)
(extractor
    (uextend x)
    (inst_data (InstructionData.Unary (Opcode.Uextend) x))
)

(decl sextend (Value) Inst)
(extractor
    (sextend x)
    (inst_data (InstructionData.Unary (Opcode.Sextend) x))
)

(decl fpromote (Value) Inst)
(extractor
    (fpromote x)
    (inst_data (InstructionData.Unary (Opcode.Fpromote) x))
)

(decl fdemote (Value) Inst)
(extractor
    (fdemote x)
    (inst_data (InstructionData.Unary (Opcode.Fdemote) x))
)

(decl fvdemote (Value) Inst)
(extractor
    (fvdemote x)
    (inst_data (InstructionData.Unary (Opcode.Fvdemote) x))
)

(decl fvpromote_low (Value) Inst)
(extractor
    (fvpromote_low a)
    (inst_data (InstructionData.Unary (Opcode.FvpromoteLow) a))
)

(decl fcvt_to_uint (Value) Inst)
(extractor
    (fcvt_to_uint x)
    (inst_data (InstructionData.Unary (Opcode.FcvtToUint) x))
)

(decl fcvt_to_uint_sat (Value) Inst)
(extractor
    (fcvt_to_uint_sat x)
    (inst_data (InstructionData.Unary (Opcode.FcvtToUintSat) x))
)

(decl fcvt_to_sint (Value) Inst)
(extractor
    (fcvt_to_sint x)
    (inst_data (InstructionData.Unary (Opcode.FcvtToSint) x))
)

(decl fcvt_to_sint_sat (Value) Inst)
(extractor
    (fcvt_to_sint_sat x)
    (inst_data (InstructionData.Unary (Opcode.FcvtToSintSat) x))
)

(decl fcvt_from_uint (Value) Inst)
(extractor
    (fcvt_from_uint x)
    (inst_data (InstructionData.Unary (Opcode.FcvtFromUint) x))
)

(decl fcvt_from_sint (Value) Inst)
(extractor
    (fcvt_from_sint x)
    (inst_data (InstructionData.Unary (Opcode.FcvtFromSint) x))
)

(decl fcvt_low_from_sint (Value) Inst)
(extractor
    (fcvt_low_from_sint x)
    (inst_data (InstructionData.Unary (Opcode.FcvtLowFromSint) x))
)

(decl isplit (Value) Inst)
(extractor
    (isplit x)
    (inst_data (InstructionData.Unary (Opcode.Isplit) x))
)

(decl iconcat (Value Value) Inst)
(extractor
    (iconcat lo hi)
    (inst_data (InstructionData.Binary (Opcode.Iconcat) (value_array_2 lo hi)))
)

(decl atomic_rmw (MemFlags AtomicRmwOp Value Value) Inst)
(extractor
    (atomic_rmw MemFlags AtomicRmwOp p x)
    (inst_data (InstructionData.AtomicRmw (Opcode.AtomicRmw) (value_array_2 p x) MemFlags AtomicRmwOp))
)

(decl atomic_cas (MemFlags Value Value Value) Inst)
(extractor
    (atomic_cas MemFlags p e x)
    (inst_data (InstructionData.AtomicCas (Opcode.AtomicCas) (value_array_3 p e x) MemFlags))
)

(decl atomic_load (MemFlags Value) Inst)
(extractor
    (atomic_load MemFlags p)
    (inst_data (InstructionData.LoadNoOffset (Opcode.AtomicLoad) p MemFlags))
)

(decl atomic_store (MemFlags Value Value) Inst)
(extractor
    (atomic_store MemFlags x p)
    (inst_data (InstructionData.StoreNoOffset (Opcode.AtomicStore) (value_array_2 x p) MemFlags))
)

(decl fence () Inst)
(extractor
    (fence )
    (inst_data (InstructionData.NullAry (Opcode.Fence)))
)