Section Linking.
(** [while_asm] is denoted as the loop of the body with two entry point, the exit of the loop, and the body in which we have the same structure as for the conditional *)
Notation label_case := (split_fin_sum _ _).

Lemma while_asm_correct (e : list instr) (p : asm 1 1) :
denote_asm (while_asm e p)
⩯ (loop (C := sub (ktree _) fin) (fun l : fin (1 + 1) =>
match label_case l with
| inl _ =>
denote_list e ;;
v <- trigger (GetReg tmp_if) ;;
if (v:value) then Ret (fS f0) else (denote_asm p f0;; Ret f0)
| inr _ => Ret f0
end)).