← Latest papers
💻 computer science

LLMs as Idiomatic Decompilers: Recovering High-Level Code from x86-64 Assembly for Dart

This paper demonstrates that small, specialized LLMs augmented with synthetic same-language data can effectively decompile x86-64 assembly into readable, idiomatic Dart code, achieving performance comparable to much larger models while revealing a capacity threshold for effective cross-lingual transfer from related languages like Swift.

Original authors: Raafat Abualazm, Ayman Abo Elhassan

Published 2026-04-03
📖 4 min read☕ Coffee break read

Original authors: Raafat Abualazm, Ayman Abo Elhassan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you find an old, dusty book written in a secret code (machine code/assembly). You want to read it, but the only way to understand it is to translate it back into a modern language like English (or in this case, Dart, a language used to build apps).

Traditionally, computers have been terrible at this translation. They act like a rigid dictionary that turns the secret code into a list of generic labels like "Variable 1," "Variable 2," and "Do Stuff." It's technically correct, but it's impossible for a human to read or understand.

This paper is about teaching a small, smart AI to be a much better translator. Here is the story of what they did, explained simply.

1. The Goal: From "Robot Speak" to "Human Story"

The researchers wanted to take x86-64 assembly (the raw, messy instructions a computer CPU actually runs) and turn it back into Dart code (the clean, readable code a human developer writes).

Think of assembly as a pile of loose Lego bricks. The goal is to snap them back together into a beautiful, recognizable castle. The problem? Most AI translators just glue the bricks together randomly. They want an AI that knows how a castle is supposed to look.

2. The Secret Sauce: Two Ways to Teach the AI

The researchers had a problem: They didn't have enough examples of Dart code to teach the AI properly. So, they tried two different "tutoring strategies":

  • Strategy A (The Pure Dart Tutor): They fed the AI thousands of examples of Dart code and its corresponding assembly. They even used other AIs to invent new practice problems (synthetic data) to give the student more homework.
  • Strategy B (The "Cousin" Tutor): They thought, "Dart is very similar to Swift (another popular app language). Maybe if we teach the AI Swift too, it will learn the concepts faster?" It's like teaching someone French by also teaching them Spanish, hoping the similarities help.

3. The Big Discovery: Size Matters!

This is the most interesting part of the paper. They tested this on two different sizes of AI "brains": a small one (4 Billion parameters) and a medium one (8 Billion parameters).

  • The Small Brain (4B): When they tried to teach it both Dart and Swift, it got confused. It was like trying to teach a toddler French and Spanish at the same time; the languages started mixing up, and the toddler made mistakes.
    • Result: The small brain worked best when it only studied Dart. Adding Swift actually made it worse.
  • The Medium Brain (8B): This brain was big enough to handle the confusion. It could look at Swift and Dart, see the similarities, and say, "Aha! They both use 'optional types'!"
    • Result: The medium brain got much better when it studied both languages.

The Lesson: There is a "tipping point" (a capacity threshold). If the AI is too small, mixing languages hurts it. If it's big enough, mixing languages helps it learn faster.

4. The Results: Small but Mighty

The researchers found something amazing:

  • They trained a tiny AI (4B parameters) for just 1.5 hours on a single graphics card.
  • This tiny AI produced Dart code that was almost as good as a giant AI (480B parameters) that is 120 times bigger and requires a massive supercomputer to run.
  • The tiny AI didn't just produce code that worked; it produced code that looked idiomatic. It used proper variable names (like userList instead of v1) and followed the style rules of Dart developers.

5. The Catch (Limitations)

The paper admits a few flaws, like a student admitting they cheated a little:

  • The "Optimization" Mismatch: The Dart examples they used were "super-optimized" (like a race car engine), but the Swift examples were "unoptimized" (like a family sedan). This made it a bit harder to compare them fairly.
  • It Compiles, But Does It Work? They checked if the code could be compiled (turned into a program), but they didn't fully check if the program did the exact right thing logically. It's like checking if a sentence is grammatically correct, but not checking if the story makes sense.

The Bottom Line

This paper proves that you don't need a supercomputer to reverse-engineer modern apps. A small, specialized AI, trained for a short time, can act like a professional translator, turning messy machine code back into clean, readable human code.

It's like taking a tiny, smart apprentice and giving them a specific, focused book to study, rather than hiring a giant, expensive library of books that no one has time to read. For the first time, we have a practical way to understand the "secret code" of modern mobile apps without needing a massive budget.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →