trident/baselines/triton/os/neptune/programs/recursive_verifier.tasm

// Hand-optimized TASM baseline: os.neptune.programs.recursive_verifier
// General-purpose recursive STARK verifier with configurable FRI rounds.
//
// Reads num_fri_rounds from public input, then delegates to verify_inner_proof.

__main:
    read_io 1
    call __verify_inner_proof
    halt

// verify_inner_proof(num_fri_rounds)
// Stack: num_fri_rounds
__verify_inner_proof:
    // 1. Read claim: program_digest(5) + num_inputs + num_outputs
    read_io 5
    read_io 1
    read_io 1
    // Stack: nfr no ni d4 d3 d2 d1 d0
    // Discard counts (used by hash loops in full impl)
    swap 6
    pop 1
    swap 5
    pop 1
    // Stack: nfr d4 d3 d2 d1 d0
    // 2. Initial hash for I/O commitment
    push 0
    push 0
    push 0
    push 0
    push 0
    push 0
    push 0
    push 0
    push 0
    push 0
    hash
    // 3. Fiat-Shamir seed
    hash
    // 4. FRI verify
    divine 5
    pop 5
    pop 5
    // 5. OOD check
    divine 5
    pop 5
    // 6. Combine constraints
    divine 1
    divine 1
    divine 1
    pop 3
    // 7. Discard nfr, output verified digest
    pop 1
    write_io 5
    return

Neighbours