def METHOD_NAME(self, fd, stat_buf):  # pylint:disable=arguments-differ
    stat, result = self.state.posix.fstat_with_result(fd)
    if claripy.is_true(result == -1):
        return -1
    # TODO: make arch-neutral
    if self.arch.name == "X86":
        self._store_i386(stat_buf, stat)
    elif self.arch.name == "AMD64":
        self._store_amd64(stat_buf, stat)
    elif self.arch.name == "PPC32":
        self._store_ppc32(stat_buf, stat)
    elif self.arch.name == "MIPS32":
        self._store_mips32(stat_buf, stat)
    elif self.arch.name.startswith("ARM"):
        self._store_arm(stat_buf, stat)
    else:
        raise angr.errors.SimProcedureError("Unsupported fstat64 arch: %s" % self.arch.name)
    return result