+ mini_emit_isninst_cast (s, klass_reg, klass->cast_class, false_label, object_is_null);
+ } else {
+ if (!s->compile_aot && !(s->opt & MONO_OPT_SHARED) && (klass->flags & TYPE_ATTRIBUTE_SEALED)) {
+ /* the remoting code is broken, access the class for now */
+ if (0) {
+ MonoVTable *vt = mono_class_vtable (s->domain, klass);
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, vtable_reg, vt);
+ } else {
+ MONO_EMIT_NEW_LOAD_MEMBASE (s, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, klass_reg, klass);
+ }
+ MONO_EMIT_NEW_BRANCH_LABEL (s, CEE_BNE_UN, false_label);
+ MONO_EMIT_NEW_BRANCH_LABEL (s, CEE_BR, object_is_null);
+ } else {
+ MONO_EMIT_NEW_LOAD_MEMBASE (s, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ /* the object_is_null target simply copies the input register to the output */
+ mini_emit_isninst_cast (s, klass_reg, klass, false_label, object_is_null);
+ }