{
  "added_at": "2026-10-19",
  "additional_evidence_urls": [
    "https://github.com/matt-kempster/m2c/blob/708d2d2cb2698f091a92492b328f73b24209f72d/README.md#L26-L49",
    "https://github.com/matt-kempster/m2c/blob/708d2d2cb2698f091a92492b328f73b24209f72d/README.md#L387-L404",
    "https://github.com/matt-kempster/m2c/blob/708d2d2cb2698f091a92492b328f73b24209f72d/pyproject.toml",
    "https://github.com/matt-kempster/m2c/blob/708d2d2cb2698f091a92492b328f73b24209f72d/LICENSE",
    "https://github.com/decompme/decomp.me/blob/f5850753ef561a3d79e6eb7e96ff08e78154b91d/cromper/cromper/wrappers/m2c_wrapper.py"
  ],
  "category": "game-analysis",
  "description_en": "Decompiler for matching projects that turns GNU as-format 32-bit MIPS, ARM, PowerPC and SuperH assembly into draft C, with partial C++ support. A target combines platform, compiler (IDO, GCC or MetroWerks CodeWarrior) and language; context files supply types, and it can infer unknown struct fields and emit global initializers. The README places it alongside splat, asm-differ and decomp-permuter, and decomp.me calls it for initial decompilations.",
  "description_zh": "面向匹配反编译项目的反编译器，将 GNU as 格式的 32 位 MIPS、ARM、PowerPC 和 SuperH 汇编转换为 C 代码初稿，并部分支持 C++。目标由平台、编译器（IDO、GCC 或 MetroWerks CodeWarrior）和语言组成；上下文文件提供类型信息，还能推断未知的结构体字段并生成全局变量初始化代码。README 将它与 splat、asm-differ 和 decomp-permuter 并列使用，decomp.me 也调用它生成初步反编译结果。",
  "entry_url": "https://awesomerea.org/resources/m2c/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/m2c/",
  "evidence_url": "https://github.com/matt-kempster/m2c/blob/708d2d2cb2698f091a92492b328f73b24209f72d/README.md",
  "group": "tools",
  "id": "m2c",
  "json_url": "https://awesomerea.org/resources/m2c/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/m2c/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/m2c/index.md",
  "name": "m2c",
  "name_zh": "m2c 匹配反编译器",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "Python 3.8+ with graphviz. Run m2c.py from a checkout or install it from the Git repository as a Python package; the package named m2c on PyPI is an unrelated project. There are no releases or tags.",
    "Input must match the GNU as assembly format, such as spimdisasm output. The README lists the mips, mipsel, mipsee (eabi64), ppc, arm, gba (APCS) and sh2 platforms, the ido, gcc and mwcc compilers, and the c and c++ languages. Struct-field inference skips structs with bitfields or unnamed union fields, and initializers cannot be generated for bitfield structs or symbols of unknown type.",
    "GPL-3.0-only. The README warns that output is sometimes suboptimal, especially for loops; it is a starting point to refine and check with a compiler and diff tool, not byte-identical source."
  ],
  "requirements_zh": [
    "需要 Python 3.8+ 和 graphviz。可在源码目录中运行 m2c.py，或从 Git 仓库将其安装为 Python 包；PyPI 上名为 m2c 的软件包是无关项目。仓库没有发布版本或标签。",
    "输入须符合 GNU as 汇编格式，例如 spimdisasm 的输出。README 列出的平台为 mips、mipsel、mipsee（eabi64）、ppc、arm、gba（APCS）和 sh2，编译器为 ido、gcc 和 mwcc，语言为 c 和 c++。结构体字段推断会跳过含位域或匿名联合字段的结构体，含位域的结构体以及类型无法推断的符号也无法生成初始化代码。",
    "采用 GPL-3.0-only 许可。README 提醒输出有时不够理想，循环尤甚；它只是需要继续完善、并用编译器和差异工具核对的起点，而非字节一致的源码。"
  ],
  "targets": [
    "binary",
    "game"
  ],
  "url": "https://github.com/matt-kempster/m2c",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
