CRACK Solution

DOUBLE TAP

CRACK state / debounce

In-game screenshot of DOUBLE TAP
In-game view
FamilyCRACK Graph0.587 DifficultyMedium Ring03 IDm02_state

Prerequisites

ROUND ROBIN

Unlocks

THRESHOLD GATE

Accepted input AA BB BB CC
Techniquestate / debounce Rulenonzero SampleAA BB BB CC

Walkthrough

Recover the accepted input below, then submit it to the CRACK verifier.

Verifier Listing
; m02_state: "debounce"/double-tap: exact len 11 (the sample string), must
; see at least one pair of consecutive identical bytes (state tracks prev), AND
; the XOR of all bytes must match the sample aggregate (0x20). Teaches state
; machine + makes strict_mutants reject single-char changes (xor fails).
; Pairs with WORM DEBOUNCE (w21). r0 = 1 on accept.

        len   r1
        cmp   r1, 11
        jnz   bad

        mov   r7, 0
        ldb   r3, [r7]      ; last = first byte
        mov   r4, r3        ; running_xor start
        inc   r7
        mov   r5, 0         ; saw_double flag

loop:
        ldb   r0, [r7]
        xor   r4, r0        ; fold all bytes
        cmp   r0, r3
        jnz   nodup
        mov   r5, 1         ; saw consecutive same
nodup:
        mov   r3, r0        ; update last
        inc   r7
        cmp   r7, r1
        jl    loop

        cmp   r5, 1
        jnz   bad
        cmp   r4, 0x20      ; sample aggregate
        jnz   bad

        mov   r0, 1
        ret
bad:
        mov   r0, 0
        ret