| # buf = (n2 + n1) * LEB_SIZE, buf0 = buf, m = 0, m0 = n3 + n1, n = LEB_SIZE, n0 = n1 * LEB_SIZE, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n3 + n2 + n1 ≤ # avol ⊦ ⟪if m0 < # avol ∧ avol[m0].mapped? ∧ n0 + n ≤ # buf0 ∧ m + n ≤ LEB_SIZE then {fail_or_success#(; ; err); if err = ESUCCESS then buf0 := copy(avol[m0].data + mkempbuf(LEB_SIZE - # avol[m0].data), m, buf0, n0, n) else choose buf with # buf = # buf0 ∧ range=(buf0, 0, buf, 0, n0) ∧ range=(buf0, n0 + n, buf, n0 + n, # buf0 - n0 + n) in buf0 := buf} else abort; n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ # buf0 = (n2 + n1) * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf0, 0, n * LEB_SIZE) = lebs(avol, n3, n)) ∧ n1 < n), n2 = 0 |
# buf = (n2 + n1) * LEB_SIZE, buf0 = buf, m = 0, m0 = n3 + n1, n = LEB_SIZE, n0 = n1 * LEB_SIZE, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), avol[m0].mapped?, m0 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n0 + n ≤ # buf0, m + n ≤ LEB_SIZE, n3 + n2 + n1 ≤ # avol, m0 < # avol → m0 < # avol ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then buf0 := copy(avol[m0].data + mkempbuf(LEB_SIZE - # avol[m0].data), m, buf0, n0, n) else choose buf with # buf = # buf0 ∧ range=(buf0, 0, buf, 0, n0) ∧ range=(buf0, n0 + n, buf, n0 + n, # buf0 - n0 + n) in buf0 := buf; n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ # buf0 = (n2 + n1) * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf0, 0, n * LEB_SIZE) = lebs(avol, n3, n)) ∧ n1 < n), n2 = 0
# buf = (n2 + n1) * LEB_SIZE, buf0 = buf, m = 0, m0 = n3 + n1, n = LEB_SIZE, n0 = n1 * LEB_SIZE, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n3 + n2 + n1 ≤ # avol, m0 < # avol → m0 < # avol ⊦ ⟪abort; n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ # buf0 = (n2 + n1) * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf0, 0, n * LEB_SIZE) = lebs(avol, n3, n)) ∧ n1 < n), n2 = 0, m0 < # avol ∧ avol[m0].mapped? ∧ n0 + n ≤ # buf0 ∧ m + n ≤ LEB_SIZE
# buf = (n2 + n1) * LEB_SIZE, buf0 = buf, m = 0, m0 = n3 + n1, n = LEB_SIZE, n0 = n1 * LEB_SIZE, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), m0 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n3 + n2 + n1 ≤ # avol ⊦ n2 = 0, m0 < # avol