// Hand-optimized TASM baseline: os.neptune.programs.proof_relay
// Simplest composition: verify one inner proof and output the claim.
//
// Delegates entirely to verify_inner_proof with 4 FRI rounds.
__main:
push 4
call __verify_inner_proof
halt
// verify_inner_proof(num_fri_rounds)
// Stack: num_fri_rounds
__verify_inner_proof:
// 1. Read claim
read_io 5
read_io 1
read_io 1
// Stack: nfr no ni d4 d3 d2 d1 d0
// Discard counts for now (used by hash_public_io loops)
swap 6
pop 1
swap 5
pop 1
// Stack: nfr d4 d3 d2 d1 d0
// Save digest for final output โ swap below nfr
swap 5
swap 4
swap 3
swap 2
swap 1
// Stack: d4 d3 d2 d1 d0 nfr
// 2. Initial I/O hash
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
hash
// 3. Derive Fiat-Shamir seed from digest + io_hash
hash
// 4. Divine base commitment
divine 5
pop 5
// 5. FRI verify (simplified: divine per round)
pop 5
// 6. OOD
divine 5
pop 5
// 7. Combine constraints
divine 1
divine 1
divine 1
pop 3
// 8. Discard nfr, output saved digest
pop 1
write_io 5
return