// CheckStyle: stop header check
// CheckStyle: stop line length check
// GENERATED CONTENT - DO NOT EDIT
// GENERATORS: org.graalvm.compiler.replacements.processor.ReplacementsAnnotationProcessor, org.graalvm.compiler.replacements.processor.PluginGenerator
package org.graalvm.compiler.replacements.nodes;


import java.lang.annotation.Annotation;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.NodeInputList;
import org.graalvm.compiler.nodes.PluginReplacementNode;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.GeneratedNodeIntrinsicInvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.GeneratedPluginFactory;
import org.graalvm.compiler.nodes.graphbuilderconf.GeneratedPluginInjectionProvider;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
import org.graalvm.compiler.options.ExcludeFromJacocoGeneratedReport;

//        class: org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode
//       method: apply(org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int)
// generated-by: org.graalvm.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
final class Plugin_BigIntegerMultiplyToLenNode_apply__0 extends GeneratedNodeIntrinsicInvocationPlugin {

    @Override
    public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
        if (!b.isPluginEnabled(this)) {
            return false;
        }
        ValueNode arg0 = args[0];
        ValueNode arg1 = args[1];
        ValueNode arg2 = args[2];
        ValueNode arg3 = args[3];
        ValueNode arg4 = args[4];
        ValueNode arg5 = args[5];
        org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode node = new org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode(arg0, arg1, arg2, arg3, arg4, arg5);
        b.add(node);
        return true;
    }
    @Override
    public Class<? extends Annotation> getSource() {
        return org.graalvm.compiler.graph.Node.NodeIntrinsic.class;
    }

    Plugin_BigIntegerMultiplyToLenNode_apply__0() {
        super("apply", org.graalvm.word.Pointer.class, int.class, org.graalvm.word.Pointer.class, int.class, org.graalvm.word.Pointer.class, int.class);
    }
}

//        class: org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode
//       method: apply(org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int,java.util.EnumSet<?>)
// generated-by: org.graalvm.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
final class Plugin_BigIntegerMultiplyToLenNode_apply__1 extends GeneratedNodeIntrinsicInvocationPlugin {

    @Override
    public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] args) {
        if (!b.isPluginEnabled(this)) {
            return false;
        }
        ValueNode arg0 = args[0];
        ValueNode arg1 = args[1];
        ValueNode arg2 = args[2];
        ValueNode arg3 = args[3];
        ValueNode arg4 = args[4];
        ValueNode arg5 = args[5];
        @SuppressWarnings({"rawtypes"})
        java.util.EnumSet arg6;
        if (args[6].isConstant()) {
            arg6 = snippetReflection/* A SNIPPET_REFLECTION */.asObject(java.util.EnumSet.class, args[6].asJavaConstant());
            assert arg6 != null;
        } else {
            if (b.shouldDeferPlugin(this)) {
                b.replacePlugin(this, targetMethod, args, PluginReplacementNode_BigIntegerMultiplyToLenNode_apply__1.FUNCTION);
                return true;
            }
            assert b.canDeferPlugin(this) : b.getClass().toString() + " " + args[6];
            return false;
        }
        org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode node = new org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
        b.add(node);
        return true;
    }
    @Override
    public Class<? extends Annotation> getSource() {
        return org.graalvm.compiler.graph.Node.NodeIntrinsic.class;
    }

    private final org.graalvm.compiler.api.replacements.SnippetReflectionProvider snippetReflection;

    Plugin_BigIntegerMultiplyToLenNode_apply__1(GeneratedPluginInjectionProvider injection) {
        super("apply", org.graalvm.word.Pointer.class, int.class, org.graalvm.word.Pointer.class, int.class, org.graalvm.word.Pointer.class, int.class, java.util.EnumSet.class);
        this.snippetReflection = injection.getInjectedArgument(org.graalvm.compiler.api.replacements.SnippetReflectionProvider.class);
    }
}
//        class: org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode
//       method: apply(org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int,org.graalvm.word.Pointer,int,java.util.EnumSet<?>)
// generated-by: org.graalvm.compiler.replacements.processor.GeneratedNodeIntrinsicPlugin$ConstructorPlugin
@ExcludeFromJacocoGeneratedReport("deferred plugin support that is only called in libgraal")
final class PluginReplacementNode_BigIntegerMultiplyToLenNode_apply__1 implements PluginReplacementNode.ReplacementFunction {
    static PluginReplacementNode.ReplacementFunction FUNCTION = new PluginReplacementNode_BigIntegerMultiplyToLenNode_apply__1();

    @Override
    public boolean replace(GraphBuilderContext b, GeneratedPluginInjectionProvider injection, Stamp stamp, NodeInputList<ValueNode> args) {
        ValueNode arg0 = args.get(0);
        ValueNode arg1 = args.get(1);
        ValueNode arg2 = args.get(2);
        ValueNode arg3 = args.get(3);
        ValueNode arg4 = args.get(4);
        ValueNode arg5 = args.get(5);
        @SuppressWarnings({"rawtypes"})
        java.util.EnumSet arg6;
        if (args.get(6).isConstant()) {
            arg6 = injection.getInjectedArgument(org.graalvm.compiler.api.replacements.SnippetReflectionProvider.class)/* B SNIPPET_REFLECTION */.asObject(java.util.EnumSet.class, args.get(6).asJavaConstant());
            assert arg6 != null;
        } else {
            return false;
        }
        org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode node = new org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
        b.add(node);
        return true;
    }
}

public class PluginFactory_BigIntegerMultiplyToLenNode implements GeneratedPluginFactory {
    @Override
    public void registerPlugins(InvocationPlugins plugins, GeneratedPluginInjectionProvider injection) {
        plugins.register(org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode.class, new Plugin_BigIntegerMultiplyToLenNode_apply__0());
        plugins.register(org.graalvm.compiler.replacements.nodes.BigIntegerMultiplyToLenNode.class, new Plugin_BigIntegerMultiplyToLenNode_apply__1(injection));
    }
}
