(pop-x86-oracle-logic x86) → (mv * x86)
Function:
(defun pop-x86-oracle-logic (x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard t)) (let ((__function__ 'pop-x86-oracle-logic)) (declare (ignorable __function__)) (b* ((rip (rip x86)) (env (env-read x86)) (oracle (cdr (assoc-equal :oracle env))) (vals (assoc-equal rip oracle)) (lst (if (consp vals) (if (consp (cdr vals)) (cdr vals) nil) nil)) ((mv val x86) (if (atom lst) (let ((x86 (!ms (list :syscall-oracle-pop-empty rip) x86))) (mv -1 x86)) (let ((x86 (env-write (acons ':file-descriptors (cdr (assoc-equal :file-descriptors env)) (acons ':file-contents (cdr (assoc-equal :file-contents env)) (acons ':oracle (put-assoc-equal rip (cdr lst) oracle) nil))) x86))) (mv (car lst) x86))))) (mv val x86))))