(x86-syscall-dup x86) → x86
Function:
(defun x86-syscall-dup (x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard t)) (let ((__function__ 'x86-syscall-dup)) (declare (ignorable __function__)) (b* ((ctx 'x86-syscall-dup) (oldfd (rgfi *rdi* x86)) ((mv ret x86) (syscall-dup oldfd x86)) ((when (or (ms x86) (not (i64p ret)))) (!ms (list ctx :oracle-val-for-syscall-dup ret) x86)) (x86 (!rgfi *rax* ret x86))) x86)))
Theorem:
(defthm x86p-of-x86-syscall-dup (implies (and (x86p x86)) (b* ((x86 (x86-syscall-dup x86))) (x86p x86))) :rule-classes :rewrite)