# decode\_insn

```
Decode an instruction and returns an insn_t object (check ua.hpp)
     ea - linear address of the instruction to decode
The return values are:
     0 => if the function fails
   or:
     insn_t object:
       cs, ip, ea, itype, size, auxpref, insnpref, segpref, flags
       n: number of operands
       is_canonical: Boolean. True if its a canonical instruction.
       feature, mnem: canonical feature and mnemonic string (if is_canonical is True)
       Op0..Op7: instances of op_t (check ua.hpp)
                 n, type, offb, offo, flags, dtyp, reg, value, addr, specval,
                 specflag1, specflag2, specflag3, specflag4

object decode_insn(long ea);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/1218.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
