2 : A Certain Bomb ★

cmp : Comparing the calculated value against your input at 8(%rsp, %rbx, 4) . 4. Common Mathematical Patterns

In most versions of the Bomb Lab, Phase 2 requires the user to input a sequence of six integers. The program checks these numbers against a specific mathematical progression logic. 1. Input Requirement Six integers separated by spaces. 2 : A Certain Bomb

imul : Multiplying the previous value by a constant (e.g., doubling each number). cmp : Comparing the calculated value against your

Look for a jne (jump if not equal) that loops back to an earlier instruction. The program checks these numbers against a specific

add : Adding a constant or the previous value to the current one.

In many lab variants, the first number must be 1 (or occasionally 0 ). If this check fails, the bomb explodes immediately. 3. The Iterative Logic

The core of this phase is a loop that iterates from the second number to the sixth. You will typically see assembly instructions like: