| pebs[m3] = mkpeb(buf0, m1, false), m = m2, m0 = m3, n0 = n, n1 = n2, m3 < # pebs, is-aligned(n, EB_PAGE_SIZE), is-aligned(m2, EB_PAGE_SIZE), mtd-cons(pebs), n2 + n ≤ # buf, m2 + n ≤ PEB_SIZE, m1 ≤ m2 ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then {pebs[m0].data := copy(buf, n1, pebs[m0].data, m, n0); pebs[m0].fill := m + n0} else choose n with (n < n0 ∨ n = 0 ∧ n0 = 0) ∧ is-aligned(n, EB_PAGE_SIZE) in if n ≠ 0 then {pebs[m0].data := copy(buf, n1, pebs[m0].data, m, n); pebs[m0].fill := m + n}⟫ mtd-cons(pebs) |
pebs[m3] = mkpeb(buf0, m1, false), m3 < # pebs, is-aligned(m2, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), mtd-cons(pebs), m1 ≤ m2, m2 + n ≤ PEB_SIZE, n2 + n ≤ # buf ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n); pebs[m3].fill := m2 + n} else choose n1 with (n1 < n ∨ n1 = 0 ∧ n = 0) ∧ is-aligned(n1, EB_PAGE_SIZE) in if n1 ≠ 0 then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n1); pebs[m3].fill := m2 + n1}⟫ mtd-cons(pebs)