package xedbindings

  1. Overview
  2. Docs

Source file function_desc.ml

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
(* "Low level" binding functions, not to be exposed. *)
open Ctypes
open Types_generated
module Functions (F : Cstubs.FOREIGN) = struct
open F

  let str2xed_address_width_enum_t = foreign "str2xed_address_width_enum_t" (string @-> returning address_width_enum)
  let str2xed_attribute_enum_t = foreign "str2xed_attribute_enum_t" (string @-> returning attribute_enum)
  let str2xed_category_enum_t = foreign "str2xed_category_enum_t" (string @-> returning category_enum)
  let str2xed_chip_enum_t = foreign "str2xed_chip_enum_t" (string @-> returning chip_enum)
  let str2xed_cpuid_group_enum_t = foreign "str2xed_cpuid_group_enum_t" (string @-> returning cpuid_group_enum)
  let str2xed_cpuid_rec_enum_t = foreign "str2xed_cpuid_rec_enum_t" (string @-> returning cpuid_rec_enum)
  let str2xed_error_enum_t = foreign "str2xed_error_enum_t" (string @-> returning error_enum)
  let str2xed_exception_enum_t = foreign "str2xed_exception_enum_t" (string @-> returning iexception_enum)
  let str2xed_extension_enum_t = foreign "str2xed_extension_enum_t" (string @-> returning extension_enum)
  let str2xed_flag_action_enum_t = foreign "str2xed_flag_action_enum_t" (string @-> returning flag_action_enum)
  let str2xed_flag_enum_t = foreign "str2xed_flag_enum_t" (string @-> returning flag_enum)
  let str2xed_iclass_enum_t = foreign "str2xed_iclass_enum_t" (string @-> returning iclass_enum)
  let str2xed_iform_enum_t = foreign "str2xed_iform_enum_t" (string @-> returning iform_enum)
  let str2xed_isa_set_enum_t = foreign "str2xed_isa_set_enum_t" (string @-> returning isa_set_enum)
  let str2xed_machine_mode_enum_t = foreign "str2xed_machine_mode_enum_t" (string @-> returning machine_mode_enum)
  let str2xed_nonterminal_enum_t = foreign "str2xed_nonterminal_enum_t" (string @-> returning nonterminal_enum)
  let str2xed_operand_action_enum_t = foreign "str2xed_operand_action_enum_t" (string @-> returning operand_action_enum)
  let str2xed_operand_convert_enum_t = foreign "str2xed_operand_convert_enum_t" (string @-> returning operand_convert_enum)
  let str2xed_operand_element_type_enum_t = foreign "str2xed_operand_element_type_enum_t" (string @-> returning operand_element_type_enum)
  let str2xed_operand_element_xtype_enum_t = foreign "str2xed_operand_element_xtype_enum_t" (string @-> returning operand_element_xtype_enum)
  let str2xed_operand_enum_t = foreign "str2xed_operand_enum_t" (string @-> returning operand_enum)
  let str2xed_operand_type_enum_t = foreign "str2xed_operand_type_enum_t" (string @-> returning operand_type_enum)
  let str2xed_operand_visibility_enum_t = foreign "str2xed_operand_visibility_enum_t" (string @-> returning operand_visibility_enum)
  let str2xed_operand_width_enum_t = foreign "str2xed_operand_width_enum_t" (string @-> returning operand_width_enum)
  let str2xed_reg_class_enum_t = foreign "str2xed_reg_class_enum_t" (string @-> returning reg_class_enum)
  let str2xed_reg_enum_t = foreign "str2xed_reg_enum_t" (string @-> returning reg_enum)
  let str2xed_syntax_enum_t = foreign "str2xed_syntax_enum_t" (string @-> returning syntax_enum)
  let xed3_operand_get_absbr = foreign "xed3_operand_get_absbr" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_agen = foreign "xed3_operand_get_agen" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_amd3dnow = foreign "xed3_operand_get_amd3dnow" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_asz = foreign "xed3_operand_get_asz" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_base0 = foreign "xed3_operand_get_base0" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_base1 = foreign "xed3_operand_get_base1" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_bcast = foreign "xed3_operand_get_bcast" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_bcrc = foreign "xed3_operand_get_bcrc" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_brdisp_width = foreign "xed3_operand_get_brdisp_width" ((ptr decoded_inst) @-> returning char)
  let xed3_operand_get_cet = foreign "xed3_operand_get_cet" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_chip = foreign "xed3_operand_get_chip" ((ptr decoded_inst) @-> returning chip_enum)
  let xed3_operand_get_cldemote = foreign "xed3_operand_get_cldemote" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_default_seg = foreign "xed3_operand_get_default_seg" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_df32 = foreign "xed3_operand_get_df32" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_df64 = foreign "xed3_operand_get_df64" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_disp = foreign "xed3_operand_get_disp" ((ptr decoded_inst) @-> returning int64_t)
  let xed3_operand_get_disp_width = foreign "xed3_operand_get_disp_width" ((ptr decoded_inst) @-> returning char)
  let xed3_operand_get_dummy = foreign "xed3_operand_get_dummy" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_easz = foreign "xed3_operand_get_easz" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_element_size = foreign "xed3_operand_get_element_size" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_encode_force = foreign "xed3_operand_get_encode_force" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_encoder_preferred = foreign "xed3_operand_get_encoder_preferred" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_eosz = foreign "xed3_operand_get_eosz" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_error = foreign "xed3_operand_get_error" ((ptr decoded_inst) @-> returning error_enum)
  let xed3_operand_get_esrc = foreign "xed3_operand_get_esrc" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_evvspace = foreign "xed3_operand_get_evvspace" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_first_f2f3 = foreign "xed3_operand_get_first_f2f3" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_has_egpr = foreign "xed3_operand_get_has_egpr" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_has_modrm = foreign "xed3_operand_get_has_modrm" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_has_sib = foreign "xed3_operand_get_has_sib" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_hint = foreign "xed3_operand_get_hint" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_iclass = foreign "xed3_operand_get_iclass" ((ptr decoded_inst) @-> returning iclass_enum)
  let xed3_operand_get_ild_f2 = foreign "xed3_operand_get_ild_f2" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_ild_f3 = foreign "xed3_operand_get_ild_f3" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_ild_seg = foreign "xed3_operand_get_ild_seg" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_imm0 = foreign "xed3_operand_get_imm0" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_imm0signed = foreign "xed3_operand_get_imm0signed" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_imm1 = foreign "xed3_operand_get_imm1" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_imm1_bytes = foreign "xed3_operand_get_imm1_bytes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_imm_width = foreign "xed3_operand_get_imm_width" ((ptr decoded_inst) @-> returning char)
  let xed3_operand_get_index = foreign "xed3_operand_get_index" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_last_f2f3 = foreign "xed3_operand_get_last_f2f3" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_llrc = foreign "xed3_operand_get_llrc" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_lock = foreign "xed3_operand_get_lock" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_lzcnt = foreign "xed3_operand_get_lzcnt" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_map = foreign "xed3_operand_get_map" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mask = foreign "xed3_operand_get_mask" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_max_bytes = foreign "xed3_operand_get_max_bytes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mem0 = foreign "xed3_operand_get_mem0" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mem1 = foreign "xed3_operand_get_mem1" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mem_width = foreign "xed3_operand_get_mem_width" ((ptr decoded_inst) @-> returning uint16_t)
  let xed3_operand_get_mod = foreign "xed3_operand_get_mod" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mode = foreign "xed3_operand_get_mode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mode_first_prefix = foreign "xed3_operand_get_mode_first_prefix" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mode_short_ud0 = foreign "xed3_operand_get_mode_short_ud0" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_modep5 = foreign "xed3_operand_get_modep5" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_modep55c = foreign "xed3_operand_get_modep55c" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_modrm_byte = foreign "xed3_operand_get_modrm_byte" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_mpxmode = foreign "xed3_operand_get_mpxmode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_must_use_evex = foreign "xed3_operand_get_must_use_evex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nd = foreign "xed3_operand_get_nd" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_need_memdisp = foreign "xed3_operand_get_need_memdisp" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_need_sib = foreign "xed3_operand_get_need_sib" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_needrex = foreign "xed3_operand_get_needrex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nelem = foreign "xed3_operand_get_nelem" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nf = foreign "xed3_operand_get_nf" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_no_apx = foreign "xed3_operand_get_no_apx" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_no_evex = foreign "xed3_operand_get_no_evex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_no_vex = foreign "xed3_operand_get_no_vex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nominal_opcode = foreign "xed3_operand_get_nominal_opcode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_norex = foreign "xed3_operand_get_norex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_norex2 = foreign "xed3_operand_get_norex2" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nprefixes = foreign "xed3_operand_get_nprefixes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nrexes = foreign "xed3_operand_get_nrexes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_nseg_prefixes = foreign "xed3_operand_get_nseg_prefixes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_osz = foreign "xed3_operand_get_osz" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_out_of_bytes = foreign "xed3_operand_get_out_of_bytes" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_outreg = foreign "xed3_operand_get_outreg" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_p4 = foreign "xed3_operand_get_p4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_disp = foreign "xed3_operand_get_pos_disp" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_imm = foreign "xed3_operand_get_pos_imm" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_imm1 = foreign "xed3_operand_get_pos_imm1" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_modrm = foreign "xed3_operand_get_pos_modrm" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_nominal_opcode = foreign "xed3_operand_get_pos_nominal_opcode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_pos_sib = foreign "xed3_operand_get_pos_sib" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_prefix66 = foreign "xed3_operand_get_prefix66" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_ptr = foreign "xed3_operand_get_ptr" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_realmode = foreign "xed3_operand_get_realmode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_reg = foreign "xed3_operand_get_reg" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_reg0 = foreign "xed3_operand_get_reg0" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg1 = foreign "xed3_operand_get_reg1" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg2 = foreign "xed3_operand_get_reg2" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg3 = foreign "xed3_operand_get_reg3" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg4 = foreign "xed3_operand_get_reg4" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg5 = foreign "xed3_operand_get_reg5" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg6 = foreign "xed3_operand_get_reg6" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg7 = foreign "xed3_operand_get_reg7" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg8 = foreign "xed3_operand_get_reg8" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_reg9 = foreign "xed3_operand_get_reg9" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_relbr = foreign "xed3_operand_get_relbr" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rep = foreign "xed3_operand_get_rep" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rex = foreign "xed3_operand_get_rex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rex2 = foreign "xed3_operand_get_rex2" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexb = foreign "xed3_operand_get_rexb" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexb4 = foreign "xed3_operand_get_rexb4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexr = foreign "xed3_operand_get_rexr" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexr4 = foreign "xed3_operand_get_rexr4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexw = foreign "xed3_operand_get_rexw" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexx = foreign "xed3_operand_get_rexx" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rexx4 = foreign "xed3_operand_get_rexx4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_rm = foreign "xed3_operand_get_rm" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_roundc = foreign "xed3_operand_get_roundc" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_sae = foreign "xed3_operand_get_sae" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_scale = foreign "xed3_operand_get_scale" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_scc = foreign "xed3_operand_get_scc" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_seg0 = foreign "xed3_operand_get_seg0" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_seg1 = foreign "xed3_operand_get_seg1" ((ptr decoded_inst) @-> returning reg_enum)
  let xed3_operand_get_seg_ovd = foreign "xed3_operand_get_seg_ovd" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_sibbase = foreign "xed3_operand_get_sibbase" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_sibindex = foreign "xed3_operand_get_sibindex" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_sibscale = foreign "xed3_operand_get_sibscale" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_skip_osz = foreign "xed3_operand_get_skip_osz" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_smode = foreign "xed3_operand_get_smode" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_srm = foreign "xed3_operand_get_srm" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_tzcnt = foreign "xed3_operand_get_tzcnt" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_ubit = foreign "xed3_operand_get_ubit" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_uimm0 = foreign "xed3_operand_get_uimm0" ((ptr decoded_inst) @-> returning uint64_t)
  let xed3_operand_get_uimm1 = foreign "xed3_operand_get_uimm1" ((ptr decoded_inst) @-> returning char)
  let xed3_operand_get_using_default_segment0 = foreign "xed3_operand_get_using_default_segment0" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_using_default_segment1 = foreign "xed3_operand_get_using_default_segment1" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vex_c4 = foreign "xed3_operand_get_vex_c4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vex_prefix = foreign "xed3_operand_get_vex_prefix" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vexdest210 = foreign "xed3_operand_get_vexdest210" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vexdest3 = foreign "xed3_operand_get_vexdest3" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vexdest4 = foreign "xed3_operand_get_vexdest4" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vexvalid = foreign "xed3_operand_get_vexvalid" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vl = foreign "xed3_operand_get_vl" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_vl_ign = foreign "xed3_operand_get_vl_ign" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_wbnoinvd = foreign "xed3_operand_get_wbnoinvd" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_get_zeroing = foreign "xed3_operand_get_zeroing" ((ptr decoded_inst) @-> returning int)
  let xed3_operand_set_absbr = foreign "xed3_operand_set_absbr" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_agen = foreign "xed3_operand_set_agen" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_amd3dnow = foreign "xed3_operand_set_amd3dnow" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_asz = foreign "xed3_operand_set_asz" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_base0 = foreign "xed3_operand_set_base0" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_base1 = foreign "xed3_operand_set_base1" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_bcast = foreign "xed3_operand_set_bcast" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_bcrc = foreign "xed3_operand_set_bcrc" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_brdisp_width = foreign "xed3_operand_set_brdisp_width" ((ptr decoded_inst) @-> char @-> returning void)
  let xed3_operand_set_cet = foreign "xed3_operand_set_cet" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_chip = foreign "xed3_operand_set_chip" ((ptr decoded_inst) @-> chip_enum @-> returning void)
  let xed3_operand_set_cldemote = foreign "xed3_operand_set_cldemote" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_default_seg = foreign "xed3_operand_set_default_seg" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_df32 = foreign "xed3_operand_set_df32" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_df64 = foreign "xed3_operand_set_df64" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_disp = foreign "xed3_operand_set_disp" ((ptr decoded_inst) @-> int64_t @-> returning void)
  let xed3_operand_set_disp_width = foreign "xed3_operand_set_disp_width" ((ptr decoded_inst) @-> char @-> returning void)
  let xed3_operand_set_dummy = foreign "xed3_operand_set_dummy" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_easz = foreign "xed3_operand_set_easz" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_element_size = foreign "xed3_operand_set_element_size" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_encode_force = foreign "xed3_operand_set_encode_force" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_encoder_preferred = foreign "xed3_operand_set_encoder_preferred" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_eosz = foreign "xed3_operand_set_eosz" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_error = foreign "xed3_operand_set_error" ((ptr decoded_inst) @-> error_enum @-> returning void)
  let xed3_operand_set_esrc = foreign "xed3_operand_set_esrc" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_evvspace = foreign "xed3_operand_set_evvspace" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_first_f2f3 = foreign "xed3_operand_set_first_f2f3" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_has_egpr = foreign "xed3_operand_set_has_egpr" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_has_modrm = foreign "xed3_operand_set_has_modrm" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_has_sib = foreign "xed3_operand_set_has_sib" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_hint = foreign "xed3_operand_set_hint" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_iclass = foreign "xed3_operand_set_iclass" ((ptr decoded_inst) @-> iclass_enum @-> returning void)
  let xed3_operand_set_ild_f2 = foreign "xed3_operand_set_ild_f2" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_ild_f3 = foreign "xed3_operand_set_ild_f3" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_ild_seg = foreign "xed3_operand_set_ild_seg" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_imm0 = foreign "xed3_operand_set_imm0" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_imm0signed = foreign "xed3_operand_set_imm0signed" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_imm1 = foreign "xed3_operand_set_imm1" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_imm1_bytes = foreign "xed3_operand_set_imm1_bytes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_imm_width = foreign "xed3_operand_set_imm_width" ((ptr decoded_inst) @-> char @-> returning void)
  let xed3_operand_set_index = foreign "xed3_operand_set_index" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_last_f2f3 = foreign "xed3_operand_set_last_f2f3" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_llrc = foreign "xed3_operand_set_llrc" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_lock = foreign "xed3_operand_set_lock" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_lzcnt = foreign "xed3_operand_set_lzcnt" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_map = foreign "xed3_operand_set_map" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mask = foreign "xed3_operand_set_mask" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_max_bytes = foreign "xed3_operand_set_max_bytes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mem0 = foreign "xed3_operand_set_mem0" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mem1 = foreign "xed3_operand_set_mem1" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mem_width = foreign "xed3_operand_set_mem_width" ((ptr decoded_inst) @-> uint16_t @-> returning void)
  let xed3_operand_set_mod = foreign "xed3_operand_set_mod" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mode = foreign "xed3_operand_set_mode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mode_first_prefix = foreign "xed3_operand_set_mode_first_prefix" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mode_short_ud0 = foreign "xed3_operand_set_mode_short_ud0" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_modep5 = foreign "xed3_operand_set_modep5" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_modep55c = foreign "xed3_operand_set_modep55c" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_modrm_byte = foreign "xed3_operand_set_modrm_byte" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_mpxmode = foreign "xed3_operand_set_mpxmode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_must_use_evex = foreign "xed3_operand_set_must_use_evex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nd = foreign "xed3_operand_set_nd" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_need_memdisp = foreign "xed3_operand_set_need_memdisp" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_need_sib = foreign "xed3_operand_set_need_sib" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_needrex = foreign "xed3_operand_set_needrex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nelem = foreign "xed3_operand_set_nelem" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nf = foreign "xed3_operand_set_nf" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_no_apx = foreign "xed3_operand_set_no_apx" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_no_evex = foreign "xed3_operand_set_no_evex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_no_vex = foreign "xed3_operand_set_no_vex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nominal_opcode = foreign "xed3_operand_set_nominal_opcode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_norex = foreign "xed3_operand_set_norex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_norex2 = foreign "xed3_operand_set_norex2" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nprefixes = foreign "xed3_operand_set_nprefixes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nrexes = foreign "xed3_operand_set_nrexes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_nseg_prefixes = foreign "xed3_operand_set_nseg_prefixes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_osz = foreign "xed3_operand_set_osz" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_out_of_bytes = foreign "xed3_operand_set_out_of_bytes" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_outreg = foreign "xed3_operand_set_outreg" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_p4 = foreign "xed3_operand_set_p4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_disp = foreign "xed3_operand_set_pos_disp" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_imm = foreign "xed3_operand_set_pos_imm" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_imm1 = foreign "xed3_operand_set_pos_imm1" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_modrm = foreign "xed3_operand_set_pos_modrm" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_nominal_opcode = foreign "xed3_operand_set_pos_nominal_opcode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_pos_sib = foreign "xed3_operand_set_pos_sib" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_prefix66 = foreign "xed3_operand_set_prefix66" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_ptr = foreign "xed3_operand_set_ptr" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_realmode = foreign "xed3_operand_set_realmode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_reg = foreign "xed3_operand_set_reg" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_reg0 = foreign "xed3_operand_set_reg0" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg1 = foreign "xed3_operand_set_reg1" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg2 = foreign "xed3_operand_set_reg2" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg3 = foreign "xed3_operand_set_reg3" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg4 = foreign "xed3_operand_set_reg4" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg5 = foreign "xed3_operand_set_reg5" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg6 = foreign "xed3_operand_set_reg6" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg7 = foreign "xed3_operand_set_reg7" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg8 = foreign "xed3_operand_set_reg8" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_reg9 = foreign "xed3_operand_set_reg9" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_relbr = foreign "xed3_operand_set_relbr" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rep = foreign "xed3_operand_set_rep" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rex = foreign "xed3_operand_set_rex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rex2 = foreign "xed3_operand_set_rex2" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexb = foreign "xed3_operand_set_rexb" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexb4 = foreign "xed3_operand_set_rexb4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexr = foreign "xed3_operand_set_rexr" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexr4 = foreign "xed3_operand_set_rexr4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexw = foreign "xed3_operand_set_rexw" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexx = foreign "xed3_operand_set_rexx" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rexx4 = foreign "xed3_operand_set_rexx4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_rm = foreign "xed3_operand_set_rm" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_roundc = foreign "xed3_operand_set_roundc" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_sae = foreign "xed3_operand_set_sae" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_scale = foreign "xed3_operand_set_scale" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_scc = foreign "xed3_operand_set_scc" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_seg0 = foreign "xed3_operand_set_seg0" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_seg1 = foreign "xed3_operand_set_seg1" ((ptr decoded_inst) @-> reg_enum @-> returning void)
  let xed3_operand_set_seg_ovd = foreign "xed3_operand_set_seg_ovd" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_sibbase = foreign "xed3_operand_set_sibbase" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_sibindex = foreign "xed3_operand_set_sibindex" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_sibscale = foreign "xed3_operand_set_sibscale" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_skip_osz = foreign "xed3_operand_set_skip_osz" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_smode = foreign "xed3_operand_set_smode" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_srm = foreign "xed3_operand_set_srm" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_tzcnt = foreign "xed3_operand_set_tzcnt" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_ubit = foreign "xed3_operand_set_ubit" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_uimm0 = foreign "xed3_operand_set_uimm0" ((ptr decoded_inst) @-> uint64_t @-> returning void)
  let xed3_operand_set_uimm1 = foreign "xed3_operand_set_uimm1" ((ptr decoded_inst) @-> char @-> returning void)
  let xed3_operand_set_using_default_segment0 = foreign "xed3_operand_set_using_default_segment0" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_using_default_segment1 = foreign "xed3_operand_set_using_default_segment1" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vex_c4 = foreign "xed3_operand_set_vex_c4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vex_prefix = foreign "xed3_operand_set_vex_prefix" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vexdest210 = foreign "xed3_operand_set_vexdest210" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vexdest3 = foreign "xed3_operand_set_vexdest3" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vexdest4 = foreign "xed3_operand_set_vexdest4" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vexvalid = foreign "xed3_operand_set_vexvalid" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vl = foreign "xed3_operand_set_vl" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_vl_ign = foreign "xed3_operand_set_vl_ign" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_wbnoinvd = foreign "xed3_operand_set_wbnoinvd" ((ptr decoded_inst) @-> int @-> returning void)
  let xed3_operand_set_zeroing = foreign "xed3_operand_set_zeroing" ((ptr decoded_inst) @-> int @-> returning void)
  let xed_addr = foreign "xed_addr" ((ptr encoder_instruction) @-> int @-> returning void)
  let xed_address_width_enum_t2str = foreign "xed_address_width_enum_t2str" (address_width_enum @-> returning string)
  let xed_attribute = foreign "xed_attribute" (int @-> returning attribute_enum)
  let xed_attribute_enum_t2str = foreign "xed_attribute_enum_t2str" (attribute_enum @-> returning string)
  let xed_attribute_max = foreign "xed_attribute_max" (void @-> returning int)
  let xed_category_enum_t2str = foreign "xed_category_enum_t2str" (category_enum @-> returning string)
  let xed_chip_enum_t2str = foreign "xed_chip_enum_t2str" (chip_enum @-> returning string)
  let xed_classify_amx = foreign "xed_classify_amx" ((ptr decoded_inst) @-> returning bool)
  let xed_classify_apx = foreign "xed_classify_apx" ((ptr decoded_inst) @-> returning bool)
  let xed_classify_avx = foreign "xed_classify_avx" ((ptr decoded_inst) @-> returning bool)
  let xed_classify_avx512 = foreign "xed_classify_avx512" ((ptr decoded_inst) @-> returning bool)
  let xed_classify_avx512_maskop = foreign "xed_classify_avx512_maskop" ((ptr decoded_inst) @-> returning bool)
  let xed_classify_sse = foreign "xed_classify_sse" ((ptr decoded_inst) @-> returning bool)
  let xed_convert_to_encoder_request = foreign "xed_convert_to_encoder_request" ((ptr encoder_request) @-> (ptr encoder_instruction) @-> returning bool)
  let xed_cpuid_group_enum_t2str = foreign "xed_cpuid_group_enum_t2str" (cpuid_group_enum @-> returning string)
  let xed_cpuid_rec_enum_t2str = foreign "xed_cpuid_rec_enum_t2str" (cpuid_rec_enum @-> returning string)
  let xed_decode = foreign "xed_decode" ((ptr decoded_inst) @-> ocaml_string @-> int @-> returning error_enum)
  let xed_decode_with_features = foreign "xed_decode_with_features" ((ptr decoded_inst) @-> ocaml_string @-> int @-> (ptr chip_features) @-> returning error_enum)
  let xed_decoded_inst_avx512_dest_elements = foreign "xed_decoded_inst_avx512_dest_elements" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_conditionally_writes_registers = foreign "xed_decoded_inst_conditionally_writes_registers" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_dump = foreign "xed_decoded_inst_dump" ((ptr decoded_inst) @-> ocaml_bytes @-> int @-> returning void)
  let xed_decoded_inst_dump_xed_format = foreign "xed_decoded_inst_dump_xed_format" ((ptr decoded_inst) @-> ocaml_bytes @-> int @-> uint64_t @-> returning bool)
  let xed_decoded_inst_get_attribute = foreign "xed_decoded_inst_get_attribute" ((ptr decoded_inst) @-> attribute_enum @-> returning uint32_t)
  let xed_decoded_inst_get_base_reg = foreign "xed_decoded_inst_get_base_reg" ((ptr decoded_inst) @-> int @-> returning reg_enum)
  let xed_decoded_inst_get_branch_displacement = foreign "xed_decoded_inst_get_branch_displacement" ((ptr decoded_inst) @-> returning int64_t)
  let xed_decoded_inst_get_branch_displacement_width = foreign "xed_decoded_inst_get_branch_displacement_width" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_branch_displacement_width_bits = foreign "xed_decoded_inst_get_branch_displacement_width_bits" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_byte = foreign "xed_decoded_inst_get_byte" ((ptr decoded_inst) @-> int @-> returning char)
  let xed_decoded_inst_get_category = foreign "xed_decoded_inst_get_category" ((ptr decoded_inst) @-> returning category_enum)
  let xed_decoded_inst_get_dfv_reg = foreign "xed_decoded_inst_get_dfv_reg" ((ptr decoded_inst) @-> returning reg_enum)
  let xed_decoded_inst_get_extension = foreign "xed_decoded_inst_get_extension" ((ptr decoded_inst) @-> returning extension_enum)
  let xed_decoded_inst_get_iclass = foreign "xed_decoded_inst_get_iclass" ((ptr decoded_inst) @-> returning iclass_enum)
  let xed_decoded_inst_get_iform_enum = foreign "xed_decoded_inst_get_iform_enum" ((ptr decoded_inst) @-> returning iform_enum)
  let xed_decoded_inst_get_iform_enum_dispatch = foreign "xed_decoded_inst_get_iform_enum_dispatch" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_immediate_is_signed = foreign "xed_decoded_inst_get_immediate_is_signed" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_immediate_width = foreign "xed_decoded_inst_get_immediate_width" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_immediate_width_bits = foreign "xed_decoded_inst_get_immediate_width_bits" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_index_reg = foreign "xed_decoded_inst_get_index_reg" ((ptr decoded_inst) @-> int @-> returning reg_enum)
  let xed_decoded_inst_get_input_chip = foreign "xed_decoded_inst_get_input_chip" ((ptr decoded_inst) @-> returning chip_enum)
  let xed_decoded_inst_get_isa_set = foreign "xed_decoded_inst_get_isa_set" ((ptr decoded_inst) @-> returning isa_set_enum)
  let xed_decoded_inst_get_length = foreign "xed_decoded_inst_get_length" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_machine_mode_bits = foreign "xed_decoded_inst_get_machine_mode_bits" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_memop_address_width = foreign "xed_decoded_inst_get_memop_address_width" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_get_memory_displacement = foreign "xed_decoded_inst_get_memory_displacement" ((ptr decoded_inst) @-> int @-> returning int64_t)
  let xed_decoded_inst_get_memory_displacement_width = foreign "xed_decoded_inst_get_memory_displacement_width" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_get_memory_displacement_width_bits = foreign "xed_decoded_inst_get_memory_displacement_width_bits" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_get_memory_operand_length = foreign "xed_decoded_inst_get_memory_operand_length" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_get_modrm = foreign "xed_decoded_inst_get_modrm" ((ptr decoded_inst) @-> returning char)
  let xed_decoded_inst_get_nprefixes = foreign "xed_decoded_inst_get_nprefixes" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_operand_width = foreign "xed_decoded_inst_get_operand_width" ((ptr decoded_inst) @-> returning uint32_t)
  let xed_decoded_inst_get_reg = foreign "xed_decoded_inst_get_reg" ((ptr decoded_inst) @-> operand_enum @-> returning reg_enum)
  let xed_decoded_inst_get_rflags_info = foreign "xed_decoded_inst_get_rflags_info" ((ptr decoded_inst) @-> returning (ptr simple_flag))
  let xed_decoded_inst_get_scale = foreign "xed_decoded_inst_get_scale" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_get_second_immediate = foreign "xed_decoded_inst_get_second_immediate" ((ptr decoded_inst) @-> returning char)
  let xed_decoded_inst_get_seg_reg = foreign "xed_decoded_inst_get_seg_reg" ((ptr decoded_inst) @-> int @-> returning reg_enum)
  let xed_decoded_inst_get_signed_immediate = foreign "xed_decoded_inst_get_signed_immediate" ((ptr decoded_inst) @-> returning int32_t)
  let xed_decoded_inst_get_stack_address_mode_bits = foreign "xed_decoded_inst_get_stack_address_mode_bits" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_get_unsigned_immediate = foreign "xed_decoded_inst_get_unsigned_immediate" ((ptr decoded_inst) @-> returning uint64_t)
  let xed_decoded_inst_get_user_data = foreign "xed_decoded_inst_get_user_data" ((ptr decoded_inst) @-> returning uint64_t)
  let xed_decoded_inst_has_mpx_prefix = foreign "xed_decoded_inst_has_mpx_prefix" ((ptr decoded_inst) @-> returning uint32_t)
  let xed_decoded_inst_inst = foreign "xed_decoded_inst_inst" ((ptr decoded_inst) @-> returning (ptr inst))
  let xed_decoded_inst_is_apx_zu = foreign "xed_decoded_inst_is_apx_zu" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_is_broadcast = foreign "xed_decoded_inst_is_broadcast" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_is_broadcast_instruction = foreign "xed_decoded_inst_is_broadcast_instruction" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_is_prefetch = foreign "xed_decoded_inst_is_prefetch" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_is_xacquire = foreign "xed_decoded_inst_is_xacquire" ((ptr decoded_inst) @-> returning uint32_t)
  let xed_decoded_inst_is_xrelease = foreign "xed_decoded_inst_is_xrelease" ((ptr decoded_inst) @-> returning uint32_t)
  let xed_decoded_inst_masked_vector_operation = foreign "xed_decoded_inst_masked_vector_operation" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_masking = foreign "xed_decoded_inst_masking" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_mem_read = foreign "xed_decoded_inst_mem_read" ((ptr decoded_inst) @-> int @-> returning bool)
  let xed_decoded_inst_mem_written = foreign "xed_decoded_inst_mem_written" ((ptr decoded_inst) @-> int @-> returning bool)
  let xed_decoded_inst_mem_written_only = foreign "xed_decoded_inst_mem_written_only" ((ptr decoded_inst) @-> int @-> returning bool)
  let xed_decoded_inst_merging = foreign "xed_decoded_inst_merging" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_noperands = foreign "xed_decoded_inst_noperands" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_number_of_memory_operands = foreign "xed_decoded_inst_number_of_memory_operands" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_operand_action = foreign "xed_decoded_inst_operand_action" ((ptr decoded_inst) @-> int @-> returning operand_action_enum)
  let xed_decoded_inst_operand_element_size_bits = foreign "xed_decoded_inst_operand_element_size_bits" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_operand_element_type = foreign "xed_decoded_inst_operand_element_type" ((ptr decoded_inst) @-> int @-> returning operand_element_type_enum)
  let xed_decoded_inst_operand_elements = foreign "xed_decoded_inst_operand_elements" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_operand_length = foreign "xed_decoded_inst_operand_length" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_operand_length_bits = foreign "xed_decoded_inst_operand_length_bits" ((ptr decoded_inst) @-> int @-> returning int)
  let xed_decoded_inst_operands = foreign "xed_decoded_inst_operands" ((ptr decoded_inst) @-> returning (ptr operand_values))
  let xed_decoded_inst_operands_const = foreign "xed_decoded_inst_operands_const" ((ptr decoded_inst) @-> returning (ptr operand_values))
  let xed_decoded_inst_set_branch_displacement = foreign "xed_decoded_inst_set_branch_displacement" ((ptr decoded_inst) @-> int64_t @-> int @-> returning void)
  let xed_decoded_inst_set_branch_displacement_bits = foreign "xed_decoded_inst_set_branch_displacement_bits" ((ptr decoded_inst) @-> int64_t @-> int @-> returning void)
  let xed_decoded_inst_set_immediate_signed = foreign "xed_decoded_inst_set_immediate_signed" ((ptr decoded_inst) @-> int32_t @-> int @-> returning void)
  let xed_decoded_inst_set_immediate_signed_bits = foreign "xed_decoded_inst_set_immediate_signed_bits" ((ptr decoded_inst) @-> int32_t @-> int @-> returning void)
  let xed_decoded_inst_set_immediate_unsigned = foreign "xed_decoded_inst_set_immediate_unsigned" ((ptr decoded_inst) @-> uint64_t @-> int @-> returning void)
  let xed_decoded_inst_set_immediate_unsigned_bits = foreign "xed_decoded_inst_set_immediate_unsigned_bits" ((ptr decoded_inst) @-> uint64_t @-> int @-> returning void)
  let xed_decoded_inst_set_input_chip = foreign "xed_decoded_inst_set_input_chip" ((ptr decoded_inst) @-> chip_enum @-> returning void)
  let xed_decoded_inst_set_memory_displacement = foreign "xed_decoded_inst_set_memory_displacement" ((ptr decoded_inst) @-> int64_t @-> int @-> returning void)
  let xed_decoded_inst_set_memory_displacement_bits = foreign "xed_decoded_inst_set_memory_displacement_bits" ((ptr decoded_inst) @-> int64_t @-> int @-> returning void)
  let xed_decoded_inst_set_mode = foreign "xed_decoded_inst_set_mode" ((ptr decoded_inst) @-> machine_mode_enum @-> address_width_enum @-> returning void)
  let xed_decoded_inst_set_scale = foreign "xed_decoded_inst_set_scale" ((ptr decoded_inst) @-> int @-> returning void)
  let xed_decoded_inst_set_user_data = foreign "xed_decoded_inst_set_user_data" ((ptr decoded_inst) @-> uint64_t @-> returning void)
  let xed_decoded_inst_uses_embedded_broadcast = foreign "xed_decoded_inst_uses_embedded_broadcast" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_uses_rflags = foreign "xed_decoded_inst_uses_rflags" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_valid = foreign "xed_decoded_inst_valid" ((ptr decoded_inst) @-> returning bool)
  let xed_decoded_inst_valid_for_chip = foreign "xed_decoded_inst_valid_for_chip" ((ptr decoded_inst) @-> chip_enum @-> returning bool)
  let xed_decoded_inst_vector_length_bits = foreign "xed_decoded_inst_vector_length_bits" ((ptr decoded_inst) @-> returning int)
  let xed_decoded_inst_zero = foreign "xed_decoded_inst_zero" ((ptr decoded_inst) @-> returning void)
  let xed_decoded_inst_zero_keep_mode = foreign "xed_decoded_inst_zero_keep_mode" ((ptr decoded_inst) @-> returning void)
  let xed_decoded_inst_zero_keep_mode_from_operands = foreign "xed_decoded_inst_zero_keep_mode_from_operands" ((ptr decoded_inst) @-> (ptr operand_values) @-> returning void)
  let xed_decoded_inst_zero_set_mode = foreign "xed_decoded_inst_zero_set_mode" ((ptr decoded_inst) @-> (ptr state) @-> returning void)
  let xed_decoded_inst_zeroing = foreign "xed_decoded_inst_zeroing" ((ptr decoded_inst) @-> returning bool)
  let xed_encode_nop = foreign "xed_encode_nop" (ocaml_bytes @-> int @-> returning error_enum)
  let xed_encode_request_print = foreign "xed_encode_request_print" ((ptr encoder_request) @-> ocaml_bytes @-> int @-> returning void)
  let xed_encoder_request_get_iclass = foreign "xed_encoder_request_get_iclass" ((ptr encoder_request) @-> returning iclass_enum)
  let xed_encoder_request_get_operand_order = foreign "xed_encoder_request_get_operand_order" ((ptr encoder_request) @-> int @-> returning operand_enum)
  let xed_encoder_request_operand_order_entries = foreign "xed_encoder_request_operand_order_entries" ((ptr encoder_request) @-> returning int)
  let xed_encoder_request_operands = foreign "xed_encoder_request_operands" ((ptr encoder_request) @-> returning (ptr operand_values))
  let xed_encoder_request_operands_const = foreign "xed_encoder_request_operands_const" ((ptr encoder_request) @-> returning (ptr operand_values))
  let xed_encoder_request_set_absbr = foreign "xed_encoder_request_set_absbr" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_agen = foreign "xed_encoder_request_set_agen" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_base0 = foreign "xed_encoder_request_set_base0" ((ptr encoder_request) @-> reg_enum @-> returning void)
  let xed_encoder_request_set_base1 = foreign "xed_encoder_request_set_base1" ((ptr encoder_request) @-> reg_enum @-> returning void)
  let xed_encoder_request_set_branch_displacement = foreign "xed_encoder_request_set_branch_displacement" ((ptr encoder_request) @-> int64_t @-> int @-> returning void)
  let xed_encoder_request_set_effective_address_size = foreign "xed_encoder_request_set_effective_address_size" ((ptr encoder_request) @-> int @-> returning void)
  let xed_encoder_request_set_effective_operand_width = foreign "xed_encoder_request_set_effective_operand_width" ((ptr encoder_request) @-> int @-> returning void)
  let xed_encoder_request_set_iclass = foreign "xed_encoder_request_set_iclass" ((ptr encoder_request) @-> iclass_enum @-> returning void)
  let xed_encoder_request_set_index = foreign "xed_encoder_request_set_index" ((ptr encoder_request) @-> reg_enum @-> returning void)
  let xed_encoder_request_set_mem0 = foreign "xed_encoder_request_set_mem0" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_mem1 = foreign "xed_encoder_request_set_mem1" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_memory_displacement = foreign "xed_encoder_request_set_memory_displacement" ((ptr encoder_request) @-> int64_t @-> int @-> returning void)
  let xed_encoder_request_set_memory_operand_length = foreign "xed_encoder_request_set_memory_operand_length" ((ptr encoder_request) @-> int @-> returning void)
  let xed_encoder_request_set_operand_order = foreign "xed_encoder_request_set_operand_order" ((ptr encoder_request) @-> int @-> operand_enum @-> returning void)
  let xed_encoder_request_set_ptr = foreign "xed_encoder_request_set_ptr" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_reg = foreign "xed_encoder_request_set_reg" ((ptr encoder_request) @-> operand_enum @-> reg_enum @-> returning void)
  let xed_encoder_request_set_relbr = foreign "xed_encoder_request_set_relbr" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_set_scale = foreign "xed_encoder_request_set_scale" ((ptr encoder_request) @-> int @-> returning void)
  let xed_encoder_request_set_seg0 = foreign "xed_encoder_request_set_seg0" ((ptr encoder_request) @-> reg_enum @-> returning void)
  let xed_encoder_request_set_seg1 = foreign "xed_encoder_request_set_seg1" ((ptr encoder_request) @-> reg_enum @-> returning void)
  let xed_encoder_request_set_simm = foreign "xed_encoder_request_set_simm" ((ptr encoder_request) @-> int32_t @-> int @-> returning void)
  let xed_encoder_request_set_uimm0 = foreign "xed_encoder_request_set_uimm0" ((ptr encoder_request) @-> uint64_t @-> int @-> returning void)
  let xed_encoder_request_set_uimm0_bits = foreign "xed_encoder_request_set_uimm0_bits" ((ptr encoder_request) @-> uint64_t @-> int @-> returning void)
  let xed_encoder_request_set_uimm1 = foreign "xed_encoder_request_set_uimm1" ((ptr encoder_request) @-> char @-> returning void)
  let xed_encoder_request_zero = foreign "xed_encoder_request_zero" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_zero_operand_order = foreign "xed_encoder_request_zero_operand_order" ((ptr encoder_request) @-> returning void)
  let xed_encoder_request_zero_set_mode = foreign "xed_encoder_request_zero_set_mode" ((ptr encoder_request) @-> (ptr state) @-> returning void)
  let xed_error_enum_t2str = foreign "xed_error_enum_t2str" (error_enum @-> returning string)
  let xed_exception_enum_t2str = foreign "xed_exception_enum_t2str" (iexception_enum @-> returning string)
  let xed_extension_enum_t2str = foreign "xed_extension_enum_t2str" (extension_enum @-> returning string)
  let xed_flag_action_action_invalid = foreign "xed_flag_action_action_invalid" (flag_action_enum @-> returning bool)
  let xed_flag_action_enum_t2str = foreign "xed_flag_action_enum_t2str" (flag_action_enum @-> returning string)
  let xed_flag_action_get_action = foreign "xed_flag_action_get_action" ((ptr flag_action) @-> int @-> returning flag_action_enum)
  let xed_flag_action_get_flag_name = foreign "xed_flag_action_get_flag_name" ((ptr flag_action) @-> returning flag_enum)
  let xed_flag_action_print = foreign "xed_flag_action_print" ((ptr flag_action) @-> ocaml_bytes @-> int @-> returning int)
  let xed_flag_action_read_action = foreign "xed_flag_action_read_action" (flag_action_enum @-> returning bool)
  let xed_flag_action_read_flag = foreign "xed_flag_action_read_flag" ((ptr flag_action) @-> returning bool)
  let xed_flag_action_write_action = foreign "xed_flag_action_write_action" (flag_action_enum @-> returning bool)
  let xed_flag_action_writes_flag = foreign "xed_flag_action_writes_flag" ((ptr flag_action) @-> returning bool)
  let xed_flag_dfv_get_default_flags_values = foreign "xed_flag_dfv_get_default_flags_values" (reg_enum @-> (ptr flag_dfv) @-> returning bool)
  let xed_flag_enum_t2str = foreign "xed_flag_enum_t2str" (flag_enum @-> returning string)
  let xed_flag_set_is_subset_of = foreign "xed_flag_set_is_subset_of" ((ptr flag_set) @-> (ptr flag_set) @-> returning bool)
  let xed_flag_set_mask = foreign "xed_flag_set_mask" ((ptr flag_set) @-> returning int)
  let xed_flag_set_print = foreign "xed_flag_set_print" ((ptr flag_set) @-> ocaml_bytes @-> int @-> returning int)
  let xed_get_chip_features = foreign "xed_get_chip_features" ((ptr chip_features) @-> chip_enum @-> returning void)
  let xed_get_copyright = foreign "xed_get_copyright" (void @-> returning string)
  let xed_get_cpuid_group_enum_for_isa_set = foreign "xed_get_cpuid_group_enum_for_isa_set" (isa_set_enum @-> int @-> returning cpuid_group_enum)
  let xed_get_cpuid_rec_enum_for_group = foreign "xed_get_cpuid_rec_enum_for_group" (cpuid_group_enum @-> int @-> returning cpuid_rec_enum)
  let xed_get_largest_enclosing_register = foreign "xed_get_largest_enclosing_register" (reg_enum @-> returning reg_enum)
  let xed_get_largest_enclosing_register32 = foreign "xed_get_largest_enclosing_register32" (reg_enum @-> returning reg_enum)
  let xed_get_register_width_bits = foreign "xed_get_register_width_bits" (reg_enum @-> returning uint32_t)
  let xed_get_register_width_bits64 = foreign "xed_get_register_width_bits64" (reg_enum @-> returning uint32_t)
  let xed_get_version = foreign "xed_get_version" (void @-> returning string)
  let xed_gpr_reg_class = foreign "xed_gpr_reg_class" (reg_enum @-> returning reg_class_enum)
  let xed_iclass_enum_t2str = foreign "xed_iclass_enum_t2str" (iclass_enum @-> returning string)
  let xed_iform_enum_t2str = foreign "xed_iform_enum_t2str" (iform_enum @-> returning string)
  let xed_iform_first_per_iclass = foreign "xed_iform_first_per_iclass" (iclass_enum @-> returning uint32_t)
  let xed_iform_max_per_iclass = foreign "xed_iform_max_per_iclass" (iclass_enum @-> returning uint32_t)
  let xed_iform_to_category = foreign "xed_iform_to_category" (iform_enum @-> returning category_enum)
  let xed_iform_to_extension = foreign "xed_iform_to_extension" (iform_enum @-> returning extension_enum)
  let xed_iform_to_iclass = foreign "xed_iform_to_iclass" (iform_enum @-> returning iclass_enum)
  let xed_iform_to_iclass_string_att = foreign "xed_iform_to_iclass_string_att" (iform_enum @-> returning string)
  let xed_iform_to_iclass_string_intel = foreign "xed_iform_to_iclass_string_intel" (iform_enum @-> returning string)
  let xed_iform_to_isa_set = foreign "xed_iform_to_isa_set" (iform_enum @-> returning isa_set_enum)
  let xed_ild_decode = foreign "xed_ild_decode" ((ptr decoded_inst) @-> ocaml_string @-> int @-> returning error_enum)
  let xed_inst_category = foreign "xed_inst_category" ((ptr inst) @-> returning category_enum)
  let xed_inst_cpl = foreign "xed_inst_cpl" ((ptr inst) @-> returning int)
  let xed_inst_exception = foreign "xed_inst_exception" ((ptr inst) @-> returning iexception_enum)
  let xed_inst_extension = foreign "xed_inst_extension" ((ptr inst) @-> returning extension_enum)
  let xed_inst_flag_info_index = foreign "xed_inst_flag_info_index" ((ptr inst) @-> returning uint32_t)
  let xed_inst_get_attribute = foreign "xed_inst_get_attribute" ((ptr inst) @-> attribute_enum @-> returning uint32_t)
  let xed_inst_iclass = foreign "xed_inst_iclass" ((ptr inst) @-> returning iclass_enum)
  let xed_inst_iform_enum = foreign "xed_inst_iform_enum" ((ptr inst) @-> returning iform_enum)
  let xed_inst_isa_set = foreign "xed_inst_isa_set" ((ptr inst) @-> returning isa_set_enum)
  let xed_inst_noperands = foreign "xed_inst_noperands" ((ptr inst) @-> returning int)
  let xed_inst_operand = foreign "xed_inst_operand" ((ptr inst) @-> int @-> returning (ptr operand))
  let xed_isa_set_enum_t2str = foreign "xed_isa_set_enum_t2str" (isa_set_enum @-> returning string)
  let xed_isa_set_is_valid_for_chip = foreign "xed_isa_set_is_valid_for_chip" (isa_set_enum @-> chip_enum @-> returning bool)
  let xed_machine_mode_enum_t2str = foreign "xed_machine_mode_enum_t2str" (machine_mode_enum @-> returning string)
  let xed_modify_chip_features = foreign "xed_modify_chip_features" ((ptr chip_features) @-> isa_set_enum @-> bool @-> returning void)
  let xed_nonterminal_enum_t2str = foreign "xed_nonterminal_enum_t2str" (nonterminal_enum @-> returning string)
  let xed_norep_map = foreign "xed_norep_map" (iclass_enum @-> returning iclass_enum)
  let xed_operand_action_conditional_read = foreign "xed_operand_action_conditional_read" (operand_action_enum @-> returning int)
  let xed_operand_action_conditional_write = foreign "xed_operand_action_conditional_write" (operand_action_enum @-> returning int)
  let xed_operand_action_enum_t2str = foreign "xed_operand_action_enum_t2str" (operand_action_enum @-> returning string)
  let xed_operand_action_read = foreign "xed_operand_action_read" (operand_action_enum @-> returning int)
  let xed_operand_action_read_and_written = foreign "xed_operand_action_read_and_written" (operand_action_enum @-> returning int)
  let xed_operand_action_read_only = foreign "xed_operand_action_read_only" (operand_action_enum @-> returning int)
  let xed_operand_action_written = foreign "xed_operand_action_written" (operand_action_enum @-> returning int)
  let xed_operand_action_written_only = foreign "xed_operand_action_written_only" (operand_action_enum @-> returning int)
  let xed_operand_conditional_read = foreign "xed_operand_conditional_read" ((ptr operand) @-> returning int)
  let xed_operand_conditional_write = foreign "xed_operand_conditional_write" ((ptr operand) @-> returning int)
  let xed_operand_convert_enum_t2str = foreign "xed_operand_convert_enum_t2str" (operand_convert_enum @-> returning string)
  let xed_operand_element_type_enum_t2str = foreign "xed_operand_element_type_enum_t2str" (operand_element_type_enum @-> returning string)
  let xed_operand_element_xtype_enum_t2str = foreign "xed_operand_element_xtype_enum_t2str" (operand_element_xtype_enum @-> returning string)
  let xed_operand_enum_t2str = foreign "xed_operand_enum_t2str" (operand_enum @-> returning string)
  let xed_operand_imm = foreign "xed_operand_imm" ((ptr operand) @-> returning uint32_t)
  let xed_operand_is_memory_addressing_register = foreign "xed_operand_is_memory_addressing_register" (operand_enum @-> returning int)
  let xed_operand_is_register = foreign "xed_operand_is_register" (operand_enum @-> returning int)
  let xed_operand_name = foreign "xed_operand_name" ((ptr operand) @-> returning operand_enum)
  let xed_operand_nonterminal_name = foreign "xed_operand_nonterminal_name" ((ptr operand) @-> returning nonterminal_enum)
  let xed_operand_operand_visibility = foreign "xed_operand_operand_visibility" ((ptr operand) @-> returning operand_visibility_enum)
  let xed_operand_print = foreign "xed_operand_print" ((ptr operand) @-> ocaml_bytes @-> int @-> returning void)
  let xed_operand_read = foreign "xed_operand_read" ((ptr operand) @-> returning int)
  let xed_operand_read_and_written = foreign "xed_operand_read_and_written" ((ptr operand) @-> returning int)
  let xed_operand_read_only = foreign "xed_operand_read_only" ((ptr operand) @-> returning int)
  let xed_operand_reg = foreign "xed_operand_reg" ((ptr operand) @-> returning reg_enum)
  let xed_operand_rw = foreign "xed_operand_rw" ((ptr operand) @-> returning operand_action_enum)
  let xed_operand_template_is_register = foreign "xed_operand_template_is_register" ((ptr operand) @-> returning int)
  let xed_operand_type = foreign "xed_operand_type" ((ptr operand) @-> returning operand_type_enum)
  let xed_operand_type_enum_t2str = foreign "xed_operand_type_enum_t2str" (operand_type_enum @-> returning string)
  let xed_operand_values_accesses_memory = foreign "xed_operand_values_accesses_memory" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_branch_not_taken_hint = foreign "xed_operand_values_branch_not_taken_hint" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_branch_taken_hint = foreign "xed_operand_values_branch_taken_hint" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_cet_no_track = foreign "xed_operand_values_cet_no_track" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_clear_rep = foreign "xed_operand_values_clear_rep" ((ptr operand_values) @-> returning void)
  let xed_operand_values_dump = foreign "xed_operand_values_dump" ((ptr operand_values) @-> ocaml_bytes @-> int @-> returning void)
  let xed_operand_values_get_atomic = foreign "xed_operand_values_get_atomic" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_get_base_reg = foreign "xed_operand_values_get_base_reg" ((ptr operand_values) @-> int @-> returning reg_enum)
  let xed_operand_values_get_branch_displacement_byte = foreign "xed_operand_values_get_branch_displacement_byte" ((ptr operand_values) @-> int @-> returning char)
  let xed_operand_values_get_branch_displacement_int64 = foreign "xed_operand_values_get_branch_displacement_int64" ((ptr operand_values) @-> returning int64_t)
  let xed_operand_values_get_branch_displacement_length = foreign "xed_operand_values_get_branch_displacement_length" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_branch_displacement_length_bits = foreign "xed_operand_values_get_branch_displacement_length_bits" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_displacement_for_memop = foreign "xed_operand_values_get_displacement_for_memop" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_get_effective_address_width = foreign "xed_operand_values_get_effective_address_width" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_effective_operand_width = foreign "xed_operand_values_get_effective_operand_width" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_iclass = foreign "xed_operand_values_get_iclass" ((ptr operand_values) @-> returning iclass_enum)
  let xed_operand_values_get_immediate_byte = foreign "xed_operand_values_get_immediate_byte" ((ptr operand_values) @-> int @-> returning char)
  let xed_operand_values_get_immediate_int64 = foreign "xed_operand_values_get_immediate_int64" ((ptr operand_values) @-> returning int64_t)
  let xed_operand_values_get_immediate_is_signed = foreign "xed_operand_values_get_immediate_is_signed" ((ptr operand_values) @-> returning int)
  let xed_operand_values_get_immediate_uint64 = foreign "xed_operand_values_get_immediate_uint64" ((ptr operand_values) @-> returning uint64_t)
  let xed_operand_values_get_index_reg = foreign "xed_operand_values_get_index_reg" ((ptr operand_values) @-> int @-> returning reg_enum)
  let xed_operand_values_get_long_mode = foreign "xed_operand_values_get_long_mode" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_get_memory_displacement_byte = foreign "xed_operand_values_get_memory_displacement_byte" ((ptr operand_values) @-> int @-> returning char)
  let xed_operand_values_get_memory_displacement_int64 = foreign "xed_operand_values_get_memory_displacement_int64" ((ptr operand_values) @-> returning int64_t)
  let xed_operand_values_get_memory_displacement_int64_raw = foreign "xed_operand_values_get_memory_displacement_int64_raw" ((ptr operand_values) @-> returning int64_t)
  let xed_operand_values_get_memory_displacement_length = foreign "xed_operand_values_get_memory_displacement_length" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_memory_displacement_length_bits = foreign "xed_operand_values_get_memory_displacement_length_bits" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_memory_displacement_length_bits_raw = foreign "xed_operand_values_get_memory_displacement_length_bits_raw" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_get_memory_operand_length = foreign "xed_operand_values_get_memory_operand_length" ((ptr operand_values) @-> int @-> returning int)
  let xed_operand_values_get_pp_vex_prefix = foreign "xed_operand_values_get_pp_vex_prefix" ((ptr operand_values) @-> returning int)
  let xed_operand_values_get_real_mode = foreign "xed_operand_values_get_real_mode" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_get_scale = foreign "xed_operand_values_get_scale" ((ptr operand_values) @-> returning int)
  let xed_operand_values_get_second_immediate = foreign "xed_operand_values_get_second_immediate" ((ptr operand_values) @-> returning char)
  let xed_operand_values_get_seg_reg = foreign "xed_operand_values_get_seg_reg" ((ptr operand_values) @-> int @-> returning reg_enum)
  let xed_operand_values_get_stack_address_width = foreign "xed_operand_values_get_stack_address_width" ((ptr operand_values) @-> returning uint32_t)
  let xed_operand_values_has_66_prefix = foreign "xed_operand_values_has_66_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_address_size_prefix = foreign "xed_operand_values_has_address_size_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_branch_displacement = foreign "xed_operand_values_has_branch_displacement" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_displacement = foreign "xed_operand_values_has_displacement" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_immediate = foreign "xed_operand_values_has_immediate" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_lock_prefix = foreign "xed_operand_values_has_lock_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_memory_displacement = foreign "xed_operand_values_has_memory_displacement" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_modrm_byte = foreign "xed_operand_values_has_modrm_byte" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_operand_size_prefix = foreign "xed_operand_values_has_operand_size_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_real_rep = foreign "xed_operand_values_has_real_rep" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_rep_prefix = foreign "xed_operand_values_has_rep_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_repne_prefix = foreign "xed_operand_values_has_repne_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_rexw_prefix = foreign "xed_operand_values_has_rexw_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_segment_prefix = foreign "xed_operand_values_has_segment_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_has_sib_byte = foreign "xed_operand_values_has_sib_byte" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_init = foreign "xed_operand_values_init" ((ptr operand_values) @-> returning void)
  let xed_operand_values_init_keep_mode = foreign "xed_operand_values_init_keep_mode" ((ptr operand_values) @-> (ptr operand_values) @-> returning void)
  let xed_operand_values_init_set_mode = foreign "xed_operand_values_init_set_mode" ((ptr operand_values) @-> (ptr state) @-> returning void)
  let xed_operand_values_is_nop = foreign "xed_operand_values_is_nop" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_lockable = foreign "xed_operand_values_lockable" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_mandatory_66_prefix = foreign "xed_operand_values_mandatory_66_prefix" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_memop_without_modrm = foreign "xed_operand_values_memop_without_modrm" ((ptr operand_values) @-> returning bool)
  let xed_operand_values_number_of_memory_operands = foreign "xed_operand_values_number_of_memory_operands" ((ptr operand_values) @-> returning int)
  let xed_operand_values_print_short = foreign "xed_operand_values_print_short" ((ptr operand_values) @-> ocaml_bytes @-> int @-> returning void)
  let xed_operand_values_segment_prefix = foreign "xed_operand_values_segment_prefix" ((ptr operand_values) @-> returning reg_enum)
  let xed_operand_values_set_absbr = foreign "xed_operand_values_set_absbr" ((ptr operand_values) @-> returning void)
  let xed_operand_values_set_base_reg = foreign "xed_operand_values_set_base_reg" ((ptr operand_values) @-> int @-> reg_enum @-> returning void)
  let xed_operand_values_set_branch_displacement = foreign "xed_operand_values_set_branch_displacement" ((ptr operand_values) @-> int64_t @-> int @-> returning void)
  let xed_operand_values_set_branch_displacement_bits = foreign "xed_operand_values_set_branch_displacement_bits" ((ptr operand_values) @-> int64_t @-> int @-> returning void)
  let xed_operand_values_set_effective_address_width = foreign "xed_operand_values_set_effective_address_width" ((ptr operand_values) @-> int @-> returning void)
  let xed_operand_values_set_effective_operand_width = foreign "xed_operand_values_set_effective_operand_width" ((ptr operand_values) @-> int @-> returning void)
  let xed_operand_values_set_iclass = foreign "xed_operand_values_set_iclass" ((ptr operand_values) @-> iclass_enum @-> returning void)
  let xed_operand_values_set_immediate_signed = foreign "xed_operand_values_set_immediate_signed" ((ptr operand_values) @-> int32_t @-> int @-> returning void)
  let xed_operand_values_set_immediate_signed_bits = foreign "xed_operand_values_set_immediate_signed_bits" ((ptr operand_values) @-> int32_t @-> int @-> returning void)
  let xed_operand_values_set_immediate_unsigned = foreign "xed_operand_values_set_immediate_unsigned" ((ptr operand_values) @-> uint64_t @-> int @-> returning void)
  let xed_operand_values_set_immediate_unsigned_bits = foreign "xed_operand_values_set_immediate_unsigned_bits" ((ptr operand_values) @-> uint64_t @-> int @-> returning void)
  let xed_operand_values_set_index_reg = foreign "xed_operand_values_set_index_reg" ((ptr operand_values) @-> int @-> reg_enum @-> returning void)
  let xed_operand_values_set_lock = foreign "xed_operand_values_set_lock" ((ptr operand_values) @-> returning void)
  let xed_operand_values_set_memory_displacement = foreign "xed_operand_values_set_memory_displacement" ((ptr operand_values) @-> int64_t @-> int @-> returning void)
  let xed_operand_values_set_memory_displacement_bits = foreign "xed_operand_values_set_memory_displacement_bits" ((ptr operand_values) @-> int64_t @-> int @-> returning void)
  let xed_operand_values_set_memory_operand_length = foreign "xed_operand_values_set_memory_operand_length" ((ptr operand_values) @-> int @-> returning void)
  let xed_operand_values_set_mode = foreign "xed_operand_values_set_mode" ((ptr operand_values) @-> (ptr state) @-> returning void)
  let xed_operand_values_set_operand_reg = foreign "xed_operand_values_set_operand_reg" ((ptr operand_values) @-> operand_enum @-> reg_enum @-> returning void)
  let xed_operand_values_set_relbr = foreign "xed_operand_values_set_relbr" ((ptr operand_values) @-> returning void)
  let xed_operand_values_set_scale = foreign "xed_operand_values_set_scale" ((ptr operand_values) @-> int @-> int @-> returning void)
  let xed_operand_values_set_seg_reg = foreign "xed_operand_values_set_seg_reg" ((ptr operand_values) @-> int @-> reg_enum @-> returning void)
  let xed_operand_values_using_default_segment = foreign "xed_operand_values_using_default_segment" ((ptr operand_values) @-> int @-> returning bool)
  let xed_operand_values_zero_branch_displacement = foreign "xed_operand_values_zero_branch_displacement" ((ptr operand_values) @-> returning void)
  let xed_operand_values_zero_immediate = foreign "xed_operand_values_zero_immediate" ((ptr operand_values) @-> returning void)
  let xed_operand_values_zero_memory_displacement = foreign "xed_operand_values_zero_memory_displacement" ((ptr operand_values) @-> returning void)
  let xed_operand_values_zero_segment_override = foreign "xed_operand_values_zero_segment_override" ((ptr operand_values) @-> returning void)
  let xed_operand_visibility_enum_t2str = foreign "xed_operand_visibility_enum_t2str" (operand_visibility_enum @-> returning string)
  let xed_operand_width = foreign "xed_operand_width" ((ptr operand) @-> returning operand_width_enum)
  let xed_operand_width_bits = foreign "xed_operand_width_bits" ((ptr operand) @-> uint32_t @-> returning uint32_t)
  let xed_operand_width_enum_t2str = foreign "xed_operand_width_enum_t2str" (operand_width_enum @-> returning string)
  let xed_operand_written = foreign "xed_operand_written" ((ptr operand) @-> returning int)
  let xed_operand_written_only = foreign "xed_operand_written_only" ((ptr operand) @-> returning int)
  let xed_operand_xtype = foreign "xed_operand_xtype" ((ptr operand) @-> returning operand_element_xtype_enum)
  let xed_reg_class = foreign "xed_reg_class" (reg_enum @-> returning reg_class_enum)
  let xed_reg_class_enum_t2str = foreign "xed_reg_class_enum_t2str" (reg_class_enum @-> returning string)
  let xed_reg_enum_t2str = foreign "xed_reg_enum_t2str" (reg_enum @-> returning string)
  let xed_rep = foreign "xed_rep" ((ptr encoder_instruction) @-> returning void)
  let xed_rep_map = foreign "xed_rep_map" (iclass_enum @-> returning iclass_enum)
  let xed_rep_remove = foreign "xed_rep_remove" (iclass_enum @-> returning iclass_enum)
  let xed_repe_map = foreign "xed_repe_map" (iclass_enum @-> returning iclass_enum)
  let xed_repne = foreign "xed_repne" ((ptr encoder_instruction) @-> returning void)
  let xed_repne_map = foreign "xed_repne_map" (iclass_enum @-> returning iclass_enum)
  let xed_set_verbosity = foreign "xed_set_verbosity" (int @-> returning void)
  let xed_simple_flag_get_flag_action = foreign "xed_simple_flag_get_flag_action" ((ptr simple_flag) @-> int @-> returning (ptr flag_action))
  let xed_simple_flag_get_may_write = foreign "xed_simple_flag_get_may_write" ((ptr simple_flag) @-> returning bool)
  let xed_simple_flag_get_must_write = foreign "xed_simple_flag_get_must_write" ((ptr simple_flag) @-> returning bool)
  let xed_simple_flag_get_nflags = foreign "xed_simple_flag_get_nflags" ((ptr simple_flag) @-> returning int)
  let xed_simple_flag_get_read_flag_set = foreign "xed_simple_flag_get_read_flag_set" ((ptr simple_flag) @-> returning (ptr flag_set))
  let xed_simple_flag_get_undefined_flag_set = foreign "xed_simple_flag_get_undefined_flag_set" ((ptr simple_flag) @-> returning (ptr flag_set))
  let xed_simple_flag_get_written_flag_set = foreign "xed_simple_flag_get_written_flag_set" ((ptr simple_flag) @-> returning (ptr flag_set))
  let xed_simple_flag_print = foreign "xed_simple_flag_print" ((ptr simple_flag) @-> ocaml_bytes @-> int @-> returning int)
  let xed_simple_flag_reads_flags = foreign "xed_simple_flag_reads_flags" ((ptr simple_flag) @-> returning bool)
  let xed_simple_flag_writes_flags = foreign "xed_simple_flag_writes_flags" ((ptr simple_flag) @-> returning bool)
  let xed_state_get_address_width = foreign "xed_state_get_address_width" ((ptr state) @-> returning address_width_enum)
  let xed_state_get_machine_mode = foreign "xed_state_get_machine_mode" ((ptr state) @-> returning machine_mode_enum)
  let xed_state_get_stack_address_width = foreign "xed_state_get_stack_address_width" ((ptr state) @-> returning address_width_enum)
  let xed_state_init = foreign "xed_state_init" ((ptr state) @-> machine_mode_enum @-> address_width_enum @-> address_width_enum @-> returning void)
  let xed_state_init2 = foreign "xed_state_init2" ((ptr state) @-> machine_mode_enum @-> address_width_enum @-> returning void)
  let xed_state_long64_mode = foreign "xed_state_long64_mode" ((ptr state) @-> returning bool)
  let xed_state_mode_width_16 = foreign "xed_state_mode_width_16" ((ptr state) @-> returning bool)
  let xed_state_mode_width_32 = foreign "xed_state_mode_width_32" ((ptr state) @-> returning bool)
  let xed_state_print = foreign "xed_state_print" ((ptr state) @-> ocaml_bytes @-> int @-> returning int)
  let xed_state_real_mode = foreign "xed_state_real_mode" ((ptr state) @-> returning bool)
  let xed_state_set_machine_mode = foreign "xed_state_set_machine_mode" ((ptr state) @-> machine_mode_enum @-> returning void)
  let xed_state_set_stack_address_width = foreign "xed_state_set_stack_address_width" ((ptr state) @-> address_width_enum @-> returning void)
  let xed_state_zero = foreign "xed_state_zero" ((ptr state) @-> returning void)
  let xed_syntax_enum_t2str = foreign "xed_syntax_enum_t2str" (syntax_enum @-> returning string)
  let xed_tables_init = foreign "xed_tables_init" (void @-> returning void)
end
OCaml

Innovation. Community. Security.